import { redirect } from '@sveltejs/kit'; import type { PageLoad } from './$types'; export const load: PageLoad = async (event) => { const session = (await event.parent()).session; if (!session?.user) throw redirect(303, '/auth/signin'); return { session: session }; };