web/error: redirect to default about page on 404 error
Some checks are pending
Run tests / check lockfile correctness (push) Waiting to run
Run tests / web sanity check (push) Waiting to run
Run tests / api sanity check (push) Waiting to run
Run tests / test service functionality (push) Waiting to run
Run tests / test service: ${{ matrix.service }} (push) Blocked by required conditions

This commit is contained in:
wukko 2024-09-04 21:23:47 +06:00
parent 201f9aaefe
commit 41c23337ff
No known key found for this signature in database
GPG key ID: 3E30B3F26C7B4AA2

View file

@ -8,6 +8,8 @@
if ($page.error?.message === "Not Found") {
if ($page.url.pathname.startsWith("/settings")) {
goto(defaultNavPage("settings"), { replaceState: true });
} else if ($page.url.pathname.startsWith("/about")) {
goto(defaultNavPage("about"), { replaceState: true });
} else {
goto("/", { replaceState: true });
}