Closed gabalafou closed 1 week 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...
Since there is now a companion server pull request, I will take this out of draft.
Good catch @peytondmurray, thanks for the review!
@peytondmurray, I re-requested your review, could you give this another look when you get a chance?
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:
history.pushState()
but an actual refresh of the browser page usingwindow.location.replace()
{urlBasename}/not-found
route matches.Pull request checklist