fix(auth): defer environment context fetch until token is available
This commit is contained in:
@@ -23,7 +23,6 @@
|
||||
@INVARIANT: Login route bypasses shell; all other routes are wrapped by ProtectedRoute.
|
||||
-->
|
||||
<script>
|
||||
import { onMount } from 'svelte';
|
||||
import '../app.css';
|
||||
import Navbar from '../components/Navbar.svelte';
|
||||
import Footer from '../components/Footer.svelte';
|
||||
@@ -36,7 +35,6 @@
|
||||
import AssistantChatPanel from '$lib/components/assistant/AssistantChatPanel.svelte';
|
||||
import { t } from '$lib/i18n';
|
||||
import {
|
||||
initializeEnvironmentContext,
|
||||
isProductionContextStore,
|
||||
selectedEnvironmentStore
|
||||
} from '$lib/stores/environmentContext.js';
|
||||
@@ -47,12 +45,6 @@
|
||||
$: isExpanded = $sidebarStore?.isExpanded || true;
|
||||
$: isProductionContext = $isProductionContextStore;
|
||||
$: selectedEnvironment = $selectedEnvironmentStore;
|
||||
|
||||
onMount(async () => {
|
||||
if (!isLoginPage) {
|
||||
await initializeEnvironmentContext();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<Toast />
|
||||
|
||||
Reference in New Issue
Block a user