import { redirect } from '@sveltejs/kit'; import type { LayoutServerLoad } from './$types'; export const load: LayoutServerLoad = async (event) => { const session = await event.locals.getSession(); if (!session) return redirect(303, '/login'); return { session: session.info }; };