Skip to content

Add a catch-all 404 route #19

Description

@priscaenoch

Problem

src/App.tsx defines explicit routes but no catch-all (path="*"). Any unknown URL renders an empty page inside the layout with no explanation and no way back. This is reachable today by typos, stale links, or a bad deep link, and is made more likely by the SPA rewrite rules in vercel.json and nginx.conf, which serve index.html for every unmatched path rather than returning a real 404.

What needs to be done

  • Add a NotFound page component with a clear message and links back to the main sections of the app.
  • Register it as the last route: <Route path="*" element={<NotFound />} />.
  • Keep it inside the existing ErrorBoundary/Suspense layout so navigation remains available.

Files

  • new src/pages/NotFound.tsx
  • src/App.tsx

Acceptance deliverables

  • Navigating to an unknown path renders the NotFound page, not a blank area.
  • The page offers at least one working link back into the app.

Tests to pass

  • Test: rendering the router at an unknown path shows the NotFound content.
  • Test: known routes are unaffected.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions