1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-26 16:29:37 +02:00
AdventureLog/frontend/src/routes/+layout.server.ts

16 lines
311 B
TypeScript
Raw Normal View History

2024-10-26 23:03:35 -04:00
import { locale } from 'svelte-i18n';
2024-07-08 11:44:39 -04:00
import type { LayoutServerLoad } from './$types';
export const load: LayoutServerLoad = async (event) => {
if (event.locals.user) {
return {
2024-10-26 23:03:35 -04:00
user: event.locals.user,
locale: event.locals.locale
2024-07-08 11:44:39 -04:00
};
}
return {
2024-10-26 23:03:35 -04:00
user: null,
locale: event.locals.locale
2024-07-08 11:44:39 -04:00
};
};