Skip to content

Commit

Permalink
basic not-found page
Browse files Browse the repository at this point in the history
  • Loading branch information
Adeynack committed Oct 15, 2024
1 parent 4d9f6c3 commit dbe0214
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
2 changes: 2 additions & 0 deletions client/src/AppRouter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
currentUserSubPath,
} from "./models/paths";
import { BooksLayout } from "./pages/books/BooksLayout";
import { NotFound } from "./pages/NotFound";

export function AppRouter() {
return (
Expand Down Expand Up @@ -51,6 +52,7 @@ export function AppRouter() {
key="user"
element={<CurrentUserShow />}
/>
<Route path="*" key="notFound" element={<NotFound />} />
</Route>
</Routes>
</BrowserRouter>
Expand Down
13 changes: 13 additions & 0 deletions client/src/pages/NotFound.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { Link } from "react-router-dom";
import { rootPath } from "../models/paths";

export function NotFound() {
return (
<div>
<p>The page at this address was not found.</p>
<p>
<Link to={rootPath}>Return to main page</Link>
</p>
</div>
);
}

0 comments on commit dbe0214

Please sign in to comment.