custom 404 page

This commit is contained in:
2026-06-12 14:17:29 +02:00
parent 887a43636f
commit 7384a3f825
3 changed files with 24 additions and 2 deletions
+1 -2
View File
@@ -4,9 +4,8 @@
- privacy policy - have no access to anything you generate, only keep a count of success/failed pdf generations with timestamp and error message - privacy policy - have no access to anything you generate, only keep a count of success/failed pdf generations with timestamp and error message
- a11y and lighthouse fixes - a11y and lighthouse fixes
- check wcag compliance - check wcag compliance
- 429 lichess error handling - 429 lichess error handling - retry after 10 seconds
- try/catch where needed in client code - try/catch where needed in client code
- generate state and check it against the state returned from lichess https://lichess.org/api#tag/oauth/GET/oauth - generate state and check it against the state returned from lichess https://lichess.org/api#tag/oauth/GET/oauth
- checkbox and toggle disabled states - checkbox and toggle disabled states
- 404 page
- react query on for study and chapter load, to allow caching - react query on for study and chapter load, to allow caching
+21
View File
@@ -0,0 +1,21 @@
import { Link } from "@tanstack/react-router";
const NotFoundView = () => {
return (
<div className="flex min-h-[calc(100vh-194px)] flex-col items-center justify-center p-6">
<div className="relative flex max-w-md flex-col items-center text-center">
<h1 className="text-2xl font-bold tracking-tight mb-4 text-(--accent)">
The page you are looking for does not exist.
</h1>
<div className="flex w-full gap-3 justify-center">
<Link to="/" className="btn btn-primary">
Go Home
</Link>
</div>
</div>
</div>
);
};
export default NotFoundView;
+2
View File
@@ -6,6 +6,7 @@ import { ToastContainer } from "react-toastify";
import GenericErrorView from "#/components/GenericErrorView.tsx"; import GenericErrorView from "#/components/GenericErrorView.tsx";
import LoadingView from "#/components/LoadingView.tsx"; import LoadingView from "#/components/LoadingView.tsx";
import { MatomoAnalytics } from "#/components/MatomoAnalytics.tsx"; import { MatomoAnalytics } from "#/components/MatomoAnalytics.tsx";
import NotFoundView from "#/components/NotFoundView.tsx";
import { LichessUserProvider } from "#/context/LichessUserContext.tsx"; import { LichessUserProvider } from "#/context/LichessUserContext.tsx";
import Footer from "../components/Footer"; import Footer from "../components/Footer";
import Header from "../components/Header"; import Header from "../components/Header";
@@ -47,6 +48,7 @@ export const Route = createRootRoute({
shellComponent: RootDocument, shellComponent: RootDocument,
errorComponent: ({ error }) => <GenericErrorView error={error} />, errorComponent: ({ error }) => <GenericErrorView error={error} />,
pendingComponent: () => <LoadingView />, pendingComponent: () => <LoadingView />,
notFoundComponent: () => <NotFoundView />,
}); });
function RootDocument({ children }: { children: ReactNode }) { function RootDocument({ children }: { children: ReactNode }) {