2024-07-04 23:18:02 +01:00
|
|
|
<script lang="ts">
|
2024-07-10 18:50:50 +01:00
|
|
|
import { goto } from "$app/navigation";
|
|
|
|
import { page } from "$app/stores";
|
|
|
|
import { defaultSettingsPage } from "$lib/settings/defaults";
|
2024-07-04 23:18:02 +01:00
|
|
|
|
2024-07-04 23:27:38 +01:00
|
|
|
$: {
|
2024-07-10 18:50:50 +01:00
|
|
|
if ($page.error?.message === "Not Found") {
|
|
|
|
if ($page.url.pathname.startsWith("/settings")) {
|
|
|
|
goto(defaultSettingsPage(), { replaceState: true });
|
|
|
|
} else {
|
|
|
|
goto("/", { replaceState: true });
|
|
|
|
}
|
2024-07-04 23:27:38 +01:00
|
|
|
}
|
|
|
|
}
|
2024-07-04 23:18:02 +01:00
|
|
|
</script>
|