diff --git a/frontend/src/components/resources/stack/services.tsx b/frontend/src/components/resources/stack/services.tsx index 3dc98fd8c..28141ea6f 100644 --- a/frontend/src/components/resources/stack/services.tsx +++ b/frontend/src/components/resources/stack/services.tsx @@ -50,7 +50,7 @@ export const StackServices = ({ ); return ( e.stopPropagation()} > { - const { id: stack_id, service } = useParams() as { + const { type, id, service } = useParams() as { + type: string; id: string; service: string; }; + if (type !== "stacks") { + return This resource type does not have any services.; + } + return ; +}; + +const StackServicePageInner = ({ + stack_id, + service, +}: { + stack_id: string; + service: string; +}) => { const stack = useStack(stack_id); useSetTitle(`${stack?.name} | ${service}`); const nav = useNavigate(); diff --git a/frontend/src/router.tsx b/frontend/src/router.tsx index 0174f091a..47aeb0d51 100644 --- a/frontend/src/router.tsx +++ b/frontend/src/router.tsx @@ -38,10 +38,6 @@ const ROUTER = createBrowserRouter([ { path: ":id", element: }, ], }, - { - path: "stacks/:id/:service", - element: , - }, { path: ":type", children: [ @@ -50,6 +46,10 @@ const ROUTER = createBrowserRouter([ { path: ":id/stats", element: }, { path: ":id/updates", element: }, { path: ":id/alerts", element: }, + { + path: ":id/service/:service", + element: , + }, ], }, ],