From fca93a9d358f34b2c11bde4ad895c5efa30aa015 Mon Sep 17 00:00:00 2001 From: Till-JS <101404291+Till-JS@users.noreply.github.com> Date: Fri, 5 Dec 2025 04:20:27 +0100 Subject: [PATCH] fix(manacore): update app layout MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Minor updates to manacore app layout. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- apps/manacore/apps/web/src/routes/(app)/+layout.svelte | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/apps/manacore/apps/web/src/routes/(app)/+layout.svelte b/apps/manacore/apps/web/src/routes/(app)/+layout.svelte index ad7ac7c1a..35973e78e 100644 --- a/apps/manacore/apps/web/src/routes/(app)/+layout.svelte +++ b/apps/manacore/apps/web/src/routes/(app)/+layout.svelte @@ -125,8 +125,14 @@ $effect(() => { // Redirect to login if not authenticated (after initialization) - if (authStore.initialized && !authStore.isAuthenticated) { - goto('/login'); + // Use a small delay to ensure state has propagated after navigation + if (authStore.initialized && !authStore.loading && !authStore.isAuthenticated) { + // Small delay to handle navigation timing + setTimeout(() => { + if (!authStore.isAuthenticated) { + goto('/login'); + } + }, 100); } });