048663a4c8
+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.
11 lines
282 B
TypeScript
11 lines
282 B
TypeScript
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 {};
|
|
};
|