@@ -320,26 +320,29 @@ export const AppRouter: FC = () => {
320
320
</ Route >
321
321
</ Route >
322
322
323
- < Route path = "/:username" >
324
- < Route path = ":workspace" >
325
- < Route index element = { < WorkspacePage /> } />
326
- < Route
327
- path = "builds/:buildNumber"
328
- element = { < WorkspaceBuildPage /> }
329
- />
330
- < Route path = "settings" element = { < WorkspaceSettingsLayout /> } >
331
- < Route index element = { < WorkspaceSettingsPage /> } />
332
- < Route
333
- path = "parameters"
334
- element = { < WorkspaceParametersPage /> }
335
- />
336
- < Route
337
- path = "schedule"
338
- element = { < WorkspaceSchedulePage /> }
339
- />
340
- </ Route >
341
- </ Route >
323
+ { /* In order for the 404 page to work properly the routes that start with
324
+ top level parameter must be fully qualified. */ }
325
+ < Route path = "/:username/:workspace" element = { < WorkspacePage /> } />
326
+ < Route
327
+ path = "/:username/:workspace/builds/:buildNumber"
328
+ element = { < WorkspaceBuildPage /> }
329
+ />
330
+ < Route
331
+ path = "/:username/:workspace/settings"
332
+ element = { < WorkspaceSettingsLayout /> }
333
+ >
334
+ < Route index element = { < WorkspaceSettingsPage /> } />
335
+ < Route
336
+ path = "parameters"
337
+ element = { < WorkspaceParametersPage /> }
338
+ />
339
+ < Route path = "schedule" element = { < WorkspaceSchedulePage /> } />
342
340
</ Route >
341
+
342
+ { /* Using path="*"" means "match anything", so this route
343
+ acts like a catch-all for URLs that we don't have explicit
344
+ routes for. */ }
345
+ < Route path = "*" element = { < NotFoundPage /> } />
343
346
</ Route >
344
347
345
348
{ /* Pages that don't have the dashboard layout */ }
@@ -354,11 +357,6 @@ export const AppRouter: FC = () => {
354
357
element = { < TemplateVersionEditorPage /> }
355
358
/>
356
359
</ Route >
357
-
358
- { /* Using path="*"" means "match anything", so this route
359
- acts like a catch-all for URLs that we don't have explicit
360
- routes for. */ }
361
- < Route path = "*" element = { < NotFoundPage /> } />
362
360
</ Routes >
363
361
</ Router >
364
362
</ Suspense >
0 commit comments