Spaces:
Paused
Paused
fix(settings): prevent unnecessary redirect on desktop
Browse files
src/routes/settings/(nav)/+layout.svelte
CHANGED
|
@@ -31,7 +31,12 @@
|
|
| 31 |
let showContent: boolean = $state(false);
|
| 32 |
|
| 33 |
function checkDesktopRedirect() {
|
| 34 |
-
if (
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
goto(`${base}/settings/application`);
|
| 36 |
}
|
| 37 |
}
|
|
|
|
| 31 |
let showContent: boolean = $state(false);
|
| 32 |
|
| 33 |
function checkDesktopRedirect() {
|
| 34 |
+
if (
|
| 35 |
+
browser &&
|
| 36 |
+
isDesktop(window) &&
|
| 37 |
+
page.url.pathname === `${base}/settings` &&
|
| 38 |
+
!page.url.pathname.endsWith("/application")
|
| 39 |
+
) {
|
| 40 |
goto(`${base}/settings/application`);
|
| 41 |
}
|
| 42 |
}
|