Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/docs/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { LearnNavigationApiPage } from "./pages/LearnNavigationApiPage.js";
import { LearnNestedRoutesPage } from "./pages/LearnNestedRoutesPage.js";
import { LearnTypeSafetyPage } from "./pages/LearnTypeSafetyPage.js";
import { ExamplesPage } from "./pages/ExamplesPage.js";
import { NotFoundPage } from "./pages/NotFoundPage.js";
import { useEffect } from "react";

const routes = [
Expand Down Expand Up @@ -71,6 +72,9 @@ const routes = [
path: "/examples",
component: ExamplesPage,
}),
route({
component: NotFoundPage,
}),
],
}),
];
Expand Down
13 changes: 13 additions & 0 deletions packages/docs/src/pages/NotFoundPage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
export function NotFoundPage() {
return (
<div className="page not-found-page">
<h1>Page Not Found</h1>
<p>The page you're looking for doesn't exist.</p>
<p>
<a href="/funstack-router/" className="button primary">
Go Home
</a>
</p>
</div>
);
}
16 changes: 16 additions & 0 deletions packages/docs/src/styles/pages.css
Original file line number Diff line number Diff line change
Expand Up @@ -225,3 +225,19 @@
.learn-content li strong {
color: var(--color-text);
}

/* Not Found Page */
.not-found-page {
text-align: center;
padding: 64px 0;
}

.not-found-page h1 {
font-size: 3rem;
margin-bottom: 16px;
}

.not-found-page p {
font-size: 1.1rem;
margin-bottom: 24px;
}