fix:continuously watch location

This commit is contained in:
2025-10-27 15:07:24 +01:00
parent fef7c160e2
commit 3b3ebc2873
6 changed files with 240 additions and 15 deletions

View File

@@ -5,6 +5,7 @@
import { page } from '$app/state';
import { Toaster } from '$lib/components/sonner/index.js';
import { Skeleton } from '$lib/components/skeleton';
import LocationManager from '$lib/components/LocationManager.svelte';
let { children, data } = $props();
let isLoginRoute = $derived(page.url.pathname.startsWith('/login'));
@@ -32,6 +33,11 @@
<Toaster />
<!-- Auto-start location watching for authenticated users -->
{#if data?.user && !isLoginRoute}
<LocationManager autoStart={true} />
{/if}
{#if showHeader && data.user}
<Header user={data.user} />
{:else if isLoading}