aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorivarlovlie <git@ivarlovlie.no>2022-09-28 15:50:42 +0200
committerivarlovlie <git@ivarlovlie.no>2022-09-28 15:50:42 +0200
commitb60f71b219412da45e8e910189e374a6ea03c478 (patch)
treea892f94b883aa76ac557546ad24f8fdf3caab172 /apps
parent3a9975ce230a892a8af0286ffa81776d03a8361b (diff)
downloadgreatoffice-b60f71b219412da45e8e910189e374a6ea03c478.tar.xz
greatoffice-b60f71b219412da45e8e910189e374a6ea03c478.zip
fix: Align public route checking with new layout groups
Diffstat (limited to 'apps')
-rw-r--r--apps/kit/src/routes/(main)/+layout.svelte4
1 files changed, 1 insertions, 3 deletions
diff --git a/apps/kit/src/routes/(main)/+layout.svelte b/apps/kit/src/routes/(main)/+layout.svelte
index e5b177e..b2b4818 100644
--- a/apps/kit/src/routes/(main)/+layout.svelte
+++ b/apps/kit/src/routes/(main)/+layout.svelte
@@ -14,9 +14,7 @@
async function redirect_if_necessary(ticket: Navigation) {
const sessionIsValid = await is_active();
// TODO: ticket.to can be empty while navigating, so coalesce could probably cause non-public routes to cause a redir to /login...
- const isPublicRoute =
- (ticket.to?.routeId?.startsWith("(public)") ?? true) ||
- ticket.to?.routeId?.startsWith("book");
+ const isPublicRoute = ticket.to?.routeId?.startsWith("(main)/(public)");
console.log("redir: ", {
isPublicRoute,