7 lines
255 B
TypeScript
7 lines
255 B
TypeScript
import { redirect } from '@sveltejs/kit';
|
|
import type { PageServerLoad } from './$types';
|
|
|
|
export const load = (async ({ locals: { user } }) => {
|
|
if (user) throw redirect(303, '/dashboard');
|
|
throw redirect(303, '/sign-in');
|
|
}) satisfies PageServerLoad;
|