import { PUBLIC_CONVEX_URL } from '$env/static/public'; import { createConvexAuthHandlers } from '@mmailaender/convex-auth-svelte/sveltekit/server'; import type { LayoutServerLoad } from './$types.js'; const { getAuthState } = createConvexAuthHandlers({ convexUrl: PUBLIC_CONVEX_URL }); export const load: LayoutServerLoad = async (event) => { return { authState: await getAuthState(event) }; };