HackYourFuture-CPH / simply-name.it

Final Project for Class17
MIT License
3 stars 1 forks source link

Frontend: 404 router fix #264

Open Midnighter opened 3 years ago

Midnighter commented 3 years ago

User story

Who: As a user What: I would like to know when I'm on a wrong URL path Why: So that I can return to a previous page

Acceptance criteria:

Any unrecognized path should lead to the 404 page.

Implementation

In src/client/App.js, in the react-router Switch, we should place last a route matching any path and leading to the 404 component:

<Route path="/">
  <NotFound />
</Route>