diff --git a/src/routes/+layout.ts b/src/routes/+layout.ts index 52cf5021..a404324b 100644 --- a/src/routes/+layout.ts +++ b/src/routes/+layout.ts @@ -12,7 +12,7 @@ import type { LayoutLoad } from './$types' import { browser } from '$app/environment' import { QueryClient } from '@tanstack/svelte-query' -export const load: LayoutLoad = async () => { +export const load: LayoutLoad = async ({ data }) => { const queryClient = new QueryClient({ defaultOptions: { queries: { @@ -30,5 +30,8 @@ export const load: LayoutLoad = async () => { } }) - return { queryClient } + return { + ...data, // Pass through parent data from +layout.server.ts (includes auth, isAuthenticated, etc.) + queryClient + } }