From 60d0aa6930ae75619a11fc0a9c21af73e86252ab Mon Sep 17 00:00:00 2001 From: Garrett Delfosse Date: Fri, 1 Dec 2023 12:35:44 -0500 Subject: [PATCH] fix: handle 404 on unknown top level routes (#10964) --- site/src/AppRouter.tsx | 46 ++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 24 deletions(-) diff --git a/site/src/AppRouter.tsx b/site/src/AppRouter.tsx index 8fa55bd9ef..ff0adab823 100644 --- a/site/src/AppRouter.tsx +++ b/site/src/AppRouter.tsx @@ -320,26 +320,29 @@ export const AppRouter: FC = () => { - - - } /> - } - /> - }> - } /> - } - /> - } - /> - - + {/* In order for the 404 page to work properly the routes that start with + top level parameter must be fully qualified. */} + } /> + } + /> + } + > + } /> + } + /> + } /> + + {/* Using path="*"" means "match anything", so this route + acts like a catch-all for URLs that we don't have explicit + routes for. */} + } /> {/* Pages that don't have the dashboard layout */} @@ -354,11 +357,6 @@ export const AppRouter: FC = () => { element={} /> - - {/* Using path="*"" means "match anything", so this route - acts like a catch-all for URLs that we don't have explicit - routes for. */} - } />