start dev
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import type { LayoutServerLoad } from './$types';
|
||||
import { getUserFromJWT } from '$lib/utils';
|
||||
|
||||
export const load: LayoutServerLoad = ({ cookies }) => {
|
||||
const jwt = cookies.get('jwt');
|
||||
if (jwt) {
|
||||
return { selfUser: getUserFromJWT(jwt) };
|
||||
}
|
||||
return { selfUser: null };
|
||||
};
|
||||
Reference in New Issue
Block a user