frontend: real world movement

This commit is contained in:
Alex
2025-01-16 14:23:54 +01:00
parent 66ce257198
commit 11c55a17ea
46 changed files with 1277 additions and 563 deletions

View File

@@ -3,8 +3,10 @@ import { refreshCookie, userDatesFromRFC3339 } from "$lib/utils/helpers";
/** @type {import('@sveltejs/kit').Handle} */
export async function handle({ event, resolve }) {
console.log("Hook started", event.url.pathname);
if (event.locals.user) {
// if there is already a user in session load page as normal
console.log("user is logged in");
return await resolve(event);
}
@@ -52,8 +54,6 @@ export async function handle({ event, resolve }) {
event.locals.user = data.user;
event.locals.subscriptions = subscriptionsData.subscriptions;
event.locals.licence_categories = licence_categoriesData.licence_categories;
// console.log("hooks.server: Printing locals:");
// console.dir(event.locals);
// load page as normal
return await resolve(event);