conda-incubator / conda-store-ui

conda-store-ui is a frontend for conda-store powered by react
https://conda-incubator.github.io/conda-store-ui/
BSD 3-Clause "New" or "Revised" License
14 stars 21 forks source link

Add NotFound component and 404 redirect #440

Closed gabalafou closed 1 week ago

gabalafou commented 4 weeks ago

Related to https://github.com/conda-incubator/conda-store/issues/899

Description

The basic idea of this pull request is that if the app loads and the user is at some unknown route such as /conda-store/foo/bar, the app will forcefully redirect them to /conda-store/not-found. This redirect should hit the server, which should return this React app along with a 404 HTTP status code. The app will in turn execute at this URL and render a "not found" page.

This pull request:

screenshot of new 404 not found page

Pull request checklist

gabalafou commented 4 weeks ago

I made this a draft PR for now until we have server-side support for the {urlBasename}/not-found route.

On the other hand, if we don't mind showing the server-controlled 404 page...

server 404 is a small json dictionary with key detail, value not found
gabalafou commented 4 weeks ago

Since there is now a companion server pull request, I will take this out of draft.

gabalafou commented 2 weeks ago

Good catch @peytondmurray, thanks for the review!

gabalafou commented 2 weeks ago

@peytondmurray, I re-requested your review, could you give this another look when you get a chance?