From 185096d35aa8adf45ede8d40bde6a5b9839ac7c6 Mon Sep 17 00:00:00 2001 From: Terry Sutton Date: Tue, 18 Oct 2022 13:58:03 -0230 Subject: [PATCH] Update main nav --- .../ProjectLayout/NavigationBar/NavigationBar.utils.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/studio/components/layouts/ProjectLayout/NavigationBar/NavigationBar.utils.tsx b/studio/components/layouts/ProjectLayout/NavigationBar/NavigationBar.utils.tsx index 7494bee61b1..c3c16aac263 100644 --- a/studio/components/layouts/ProjectLayout/NavigationBar/NavigationBar.utils.tsx +++ b/studio/components/layouts/ProjectLayout/NavigationBar/NavigationBar.utils.tsx @@ -15,7 +15,10 @@ import { Route } from 'components/ui/ui.types' import { IS_PLATFORM, PROJECT_STATUS } from 'lib/constants' export const generateToolRoutes = (ref?: string, project?: ProjectBase): Route[] => { - const isProjectBuilding = project?.status !== PROJECT_STATUS.ACTIVE_HEALTHY + const isProjectBuilding = project?.status === PROJECT_STATUS.COMING_UP + const isProjectPaused = project?.status === PROJECT_STATUS.INACTIVE + + const homeUrl = `/project/${ref}` const buildingUrl = `/project/${ref}/building` return [ @@ -29,7 +32,9 @@ export const generateToolRoutes = (ref?: string, project?: ProjectBase): Route[] preProcessor={(code) => code.replace(/svg/, 'svg class="m-auto text-color-inherit"')} /> ), - link: ref && (isProjectBuilding ? buildingUrl : `/project/${ref}/editor`), + link: + ref && + (isProjectPaused ? homeUrl : isProjectBuilding ? buildingUrl : `/project/${ref}/editor`), }, { key: 'sql',