Add secrets configuration to wrangler.jsonc and improve null checks in layout component

This commit is contained in:
Rotimi Best
2026-03-28 18:17:18 +01:00
parent ac1e9cea97
commit 732363abfd
2 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -101,7 +101,7 @@
$effect(() => {
// this means the session cookie 'classroomio.session_data' expired and we need to trigger a new session
// triggering a new session will update the session data in the cookies so that our hooks.server.ts doesn't always have to hit the DB when checking if user is logged in or not. Without the session cookie, every page navigation or route would always hit the database to check if user is logged in or not.
if (!data.locals.fromSessions && isSessionReady) {
if (!data?.locals?.fromSessions && isSessionReady) {
authClient.getSession().then(() => {
console.log('triggered new session');
});
+3
View File
@@ -12,5 +12,8 @@
"enabled": true,
"invocation_logs": true
}
},
"secrets": {
"required": ["PRIVATE_SERVER_KEY"]
}
}