user displayed in navbar with option to logout
This commit is contained in:
9
src/routes/(main)/+layout.server.ts
Normal file
9
src/routes/(main)/+layout.server.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import type {LayoutServerLoad} from './$types';
|
||||
import { authenticateUser } from '$lib/js/authenticate';;
|
||||
|
||||
export const load = (async ({cookies}) => {
|
||||
const user = await authenticateUser(cookies)
|
||||
return {
|
||||
user
|
||||
}
|
||||
}) satisfies LayoutServerLoad;
|
Reference in New Issue
Block a user