diff --git a/frontend/src/App.svelte b/frontend/src/App.svelte index 200871e..2691ebb 100644 --- a/frontend/src/App.svelte +++ b/frontend/src/App.svelte @@ -9,10 +9,13 @@ import Settings from './routes/Settings.svelte' import Notifications from './routes/Notifications.svelte' import RepoExplorer from './routes/RepoExplorer.svelte' + const auth = getAuthState() + $effect(() => { initAuth() }) + function getComponent(path: string) { switch (path) { case '/login': @@ -35,9 +38,11 @@ return auth.session ? Dashboard : Login } } + let currentPath = $derived(getCurrentPath()) let CurrentComponent = $derived(getComponent(currentPath)) +
{#if auth.loading}
@@ -47,6 +52,7 @@ {/if}
+