From 2bf045b73c6fdf1955391f5fbbf0ad9a03c1e7b8 Mon Sep 17 00:00:00 2001 From: McKayla Washburn Date: Tue, 12 Mar 2024 16:40:17 +0000 Subject: [PATCH] fix: hide actions and notifications from deleted workspaces --- .../pages/WorkspacePage/WorkspaceTopbar.tsx | 80 +++++++++++-------- 1 file changed, 45 insertions(+), 35 deletions(-) diff --git a/site/src/pages/WorkspacePage/WorkspaceTopbar.tsx b/site/src/pages/WorkspacePage/WorkspaceTopbar.tsx index 23cfba1d9a66a..189ef65a7b445 100644 --- a/site/src/pages/WorkspacePage/WorkspaceTopbar.tsx +++ b/site/src/pages/WorkspacePage/WorkspaceTopbar.tsx @@ -106,6 +106,10 @@ export const WorkspaceTopbar: FC = ({ allowAdvancedScheduling, ); + const isImmutable = + workspace.latest_build.status === "deleted" || + workspace.latest_build.status === "deleting"; + return ( @@ -196,11 +200,13 @@ export const WorkspaceTopbar: FC = ({ - + {!isImmutable && ( + + )} {shouldDisplayDormantData && ( @@ -247,36 +253,40 @@ export const WorkspaceTopbar: FC = ({ gap: 12, }} > - - - + {!isImmutable && ( + <> + + + + + )} );