fix(ui): preserve environment selection across logout

handleLogout explicitly cleared the env from localStorage, forcing the
env switcher modal to re-open on every login. Drop that clear so the
last selected env is restored from localStorage on the next session —
the expected behavior for a personal-preference store.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-04-23 19:14:30 +02:00
parent f049a0a6a0
commit 166568edea

View File

@@ -729,7 +729,6 @@ function LayoutContent() {
// --- Callbacks ---------------------------------------------------- // --- Callbacks ----------------------------------------------------
const handleLogout = useCallback(() => { const handleLogout = useCallback(() => {
logout(); logout();
useEnvironmentStore.getState().setEnvironment(undefined);
navigate('/login'); navigate('/login');
}, [logout, navigate]); }, [logout, navigate]);