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:
parent
9c8d982230
commit
629c66cc34
1 changed files with 6 additions and 3 deletions
|
|
@ -31,10 +31,13 @@
|
||||||
|
|
||||||
$effect(() => {
|
$effect(() => {
|
||||||
const path = $page.url.pathname;
|
const path = $page.url.pathname;
|
||||||
if (!path.startsWith('/auth/')) {
|
// Auth-only routes (login, forgot) - no auth required, no layout chrome
|
||||||
checkAuth();
|
// /auth/change-password requires auth, so treat it like a regular route
|
||||||
} else {
|
const isAuthOnlyRoute = path === '/auth/login' || path === '/auth/forgot';
|
||||||
|
if (isAuthOnlyRoute) {
|
||||||
loading = false;
|
loading = false;
|
||||||
|
} else {
|
||||||
|
checkAuth();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue