diff --git a/apps/manacore/apps/web/src/routes/(auth)/+layout.svelte b/apps/manacore/apps/web/src/routes/(auth)/+layout.svelte index 3c06c9adb..87fa3096b 100644 --- a/apps/manacore/apps/web/src/routes/(auth)/+layout.svelte +++ b/apps/manacore/apps/web/src/routes/(auth)/+layout.svelte @@ -8,21 +8,11 @@ let { children }: { children: Snippet } = $props(); let isDark = $derived(theme.isDark); - let hasCheckedAuth = $state(false); - - // Check auth status on mount + // If user is already authenticated when visiting auth pages, redirect to home onMount(async () => { await authStore.initialize(); - hasCheckedAuth = true; if (authStore.isAuthenticated) { - goto('/dashboard'); - } - }); - - // Also react to auth state changes (e.g., after successful login) - $effect(() => { - if (hasCheckedAuth && authStore.isAuthenticated) { - goto('/dashboard'); + goto('/home'); } }); diff --git a/apps/manacore/apps/web/src/routes/(auth)/login/+page.svelte b/apps/manacore/apps/web/src/routes/(auth)/login/+page.svelte index c4966c658..c7debd0f3 100644 --- a/apps/manacore/apps/web/src/routes/(auth)/login/+page.svelte +++ b/apps/manacore/apps/web/src/routes/(auth)/login/+page.svelte @@ -38,7 +38,7 @@ onVerifyBackupCode={(code) => authStore.verifyBackupCode(code)} onSendMagicLink={(email) => authStore.sendMagicLink(email)} {goto} - successRedirect="/dashboard" + successRedirect="/home" registerPath="/register" forgotPasswordPath="/forgot-password" lightBackground="#f3f4f6" diff --git a/apps/manacore/apps/web/src/routes/+page.svelte b/apps/manacore/apps/web/src/routes/+page.svelte index 108a8419c..e8f17437d 100644 --- a/apps/manacore/apps/web/src/routes/+page.svelte +++ b/apps/manacore/apps/web/src/routes/+page.svelte @@ -1,13 +1,14 @@