feat(web): wire root layout — bootstrap, guard, Shell, QueryProvider
+layout.ts runs auth.bootstrap() in load() so the shell sees the user synchronously. +layout.svelte installs the TanStack QueryClientProvider, runs the route guard as a \$effect, and swaps Shell vs. bare slot based on auth state.
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import type { LayoutLoad } from './$types';
|
||||
import { bootstrap } from '$lib/auth/store.svelte';
|
||||
|
||||
export const ssr = false; // adapter-static fallback; we're SPA-only
|
||||
export const prerender = false;
|
||||
|
||||
export const load: LayoutLoad = async () => {
|
||||
await bootstrap();
|
||||
return {};
|
||||
};
|
||||
Reference in New Issue
Block a user