user displayed in navbar with option to logout

This commit is contained in:
2023-07-19 14:52:50 +02:00
parent 8f045d7111
commit 2b0c954aa5
11 changed files with 189 additions and 28 deletions

View File

@@ -0,0 +1,11 @@
import type {LayoutServerLoad} from './$types';
import { authenticateUser } from '$lib/js/authenticate';;
export const load = (async ({cookies}) => {
const user = await authenticateUser(cookies)
console.log("LOAD LAYOUT")
console.log(user)
return {
user
}
}) satisfies LayoutServerLoad;