elements icon indicating copy to clipboard operation
elements copied to clipboard

Show `NotFound` component if no React Router route is matched — dev portal

Open estrattonbailey opened this issue 2 years ago • 1 comments

User story.

As a end-user, if I hit a malformed URL, I'm taken to the root of the docs site instead of shown a blank screen.

Is your feature request related to a problem?

Yeah I considered filing a bug. We're deploying the Dev Portal as a SPA on a sub-route /docs. If we hit any of routes configured with React Router, we're fine e.g. /docs/foo.

However, if you hit /docs/foo/bar, no React Router route is matched, and nothing renders to the page.

Describe the solution you'd like

I would expect at least your NotFound component to render. Alternatively, it'd be great to be able to supply a fallback, like say taking them to our "Overview" page.

Additional context

Here's our implementation atm, /foo and /foo/bar.

estrattonbailey avatar Feb 01 '22 23:02 estrattonbailey

@pamgoodrich

fsargent avatar Feb 03 '22 19:02 fsargent

Hello!

Our team recently took over the stewardship of the elements repo.

Due the volume of un-triaged issues that are pretty old and the time it would take us to get caught up on all of them, we kindly ask that you open up a new ticket if this is still an issue you're struggling with.

If you open a new issue please include:

  • clear steps to reproduce that include example OAS specs, application setup, code, etc.
  • the error or issue you are experiencing
  • the expected behavior

We will be triaging any new tickets in a timely manner.

Thank you for understanding!

chohmann avatar Nov 17 '23 22:11 chohmann