Skip to content

Commit

Permalink
fix preview env routing for legacy (#4604)
Browse files Browse the repository at this point in the history
  • Loading branch information
Feroze Mohideen authored May 3, 2024
1 parent 4dfa55d commit 6dacc3d
Showing 1 changed file with 25 additions and 15 deletions.
40 changes: 25 additions & 15 deletions dashboard/src/main/home/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,9 @@ const Home: React.FC<Props> = (props) => {
"/env-groups",
"/datastores",
"/stacks",
...(!currentProject?.simplified_view_enabled
? ["/preview-environments"]
: []),
]}
render={() => {
if (currentCluster?.id === -1) {
Expand Down Expand Up @@ -606,21 +609,28 @@ const Home: React.FC<Props> = (props) => {
path={"/project-settings"}
render={() => <GuardedProjectSettings />}
/>
<Route exact path="/preview-environments/configure">
<SetupApp />
</Route>
<Route exact path={`/preview-environments/apps/:appName/:tab`}>
<AppView preview />
</Route>
<Route exact path="/preview-environments/apps/:appName">
<AppView preview />
</Route>
<Route exact path={`/preview-environments/apps`}>
<Apps />
</Route>
<Route exact path={`/preview-environments`}>
<PreviewEnvs />
</Route>
{currentProject?.simplified_view_enabled && (
<>
<Route exact path="/preview-environments/configure">
<SetupApp />
</Route>
<Route
exact
path={`/preview-environments/apps/:appName/:tab`}
>
<AppView preview />
</Route>
<Route exact path="/preview-environments/apps/:appName">
<AppView preview />
</Route>
<Route exact path={`/preview-environments/apps`}>
<Apps />
</Route>
<Route exact path={`/preview-environments`}>
<PreviewEnvs />
</Route>
</>
)}
<Route path={"*"} render={() => <LaunchWrapper />} />
</Switch>
</ViewWrapper>
Expand Down

0 comments on commit 6dacc3d

Please sign in to comment.