Fix layout rendering for /auth/change-password page

The change-password page was showing both the main layout sidebar
and its own header. Now only auth-only routes (login, forgot)
skip the main layout.
This commit is contained in:
Christoph Haas 2026-03-23 22:17:32 +01:00
parent 9c8d982230
commit 629c66cc34

View file

@ -31,10 +31,13 @@
$effect(() => {
const path = $page.url.pathname;
if (!path.startsWith('/auth/')) {
checkAuth();
} else {
// Auth-only routes (login, forgot) - no auth required, no layout chrome
// /auth/change-password requires auth, so treat it like a regular route
const isAuthOnlyRoute = path === '/auth/login' || path === '/auth/forgot';
if (isAuthOnlyRoute) {
loading = false;
} else {
checkAuth();
}
});