Skip to content

Commit

Permalink
protect routes
Browse files Browse the repository at this point in the history
  • Loading branch information
alicenstar committed Oct 16, 2023
1 parent 571064d commit c85337f
Showing 1 changed file with 18 additions and 11 deletions.
29 changes: 18 additions & 11 deletions web/src/Root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -574,17 +574,24 @@ const Root = () => {
}
/>
<Route path="/unsupported" element={<UnsupportedBrowser />} />
<Route
path="/cluster/manage"
element={
state.adminConsoleMetadata?.isKurl ? (
<KurlClusterManagement appName={state.selectedAppName} />
) : (
<HelmVMClusterManagement />
)
}
/>
<Route path="/cluster/:nodeId" element={<HelmVMViewNode />} />
{state.adminConsoleMetadata?.isKurl ||
(state.adminConsoleMetadata?.isHelmVM && (
<Route
path="/cluster/manage"
element={
state.adminConsoleMetadata?.isKurl ? (
<KurlClusterManagement
appName={state.selectedAppName}
/>
) : (
<HelmVMClusterManagement />
)
}
/>
))}
{state.adminConsoleMetadata?.isHelmVM && (
<Route path="/cluster/:nodeId" element={<HelmVMViewNode />} />
)}
<Route
path="/gitops"
element={<GitOps appName={state.selectedAppName || ""} />}
Expand Down

0 comments on commit c85337f

Please sign in to comment.