feat: add dashboard layout with navigation and auth guard

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Sanju Sivalingam
2026-02-17 14:32:26 +05:30
parent c0cf5039cd
commit ebe82c7481
7 changed files with 116 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
import { redirect } from '@sveltejs/kit';
import type { LayoutServerLoad } from './$types';
export const load: LayoutServerLoad = async ({ locals }) => {
if (!locals.user) {
redirect(307, '/login');
}
return {
user: locals.user
};
};