peer-at-code-web/src/routes/+page.server.ts
2023-07-26 17:11:18 +02:00

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;