Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ef97014

Browse files
committed
fix warnings on the workspace page
1 parent b4a46db commit ef97014

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

site/src/pages/WorkspacePage/Workspace.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,13 @@ export const Workspace: FC<WorkspaceProps> = ({
110110
(r) => resourceOptionValue(r) === resourcesNav.value,
111111
);
112112

113-
const shouldDisplayBuildLogs =
114-
(buildLogs ?? []).length > 0 && workspace.latest_build.status !== "running";
115-
113+
const workspaceRunning = workspace.latest_build.status === "running";
114+
const haveBuildLogs = (buildLogs ?? []).length > 0;
116115
const provisionersHealthy =
117116
(workspace.latest_build.matched_provisioners?.available ?? 0) > 0;
117+
const shouldDisplayBuildLogs = haveBuildLogs && !workspaceRunning;
118118
const shouldShowProvisionerAlert =
119-
!shouldDisplayBuildLogs && !provisionersHealthy;
119+
!workspaceRunning && !haveBuildLogs && !provisionersHealthy;
120120

121121
return (
122122
<div

0 commit comments

Comments
 (0)