Skip to content

Commit

Permalink
fix unspecified
Browse files Browse the repository at this point in the history
  • Loading branch information
mustard-mh committed Nov 13, 2023
1 parent 48f1053 commit 5718585
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Tooltip from "../components/Tooltip";
import { WorkspacePhase_Phase, WorkspaceStatus } from "@gitpod/public-api/lib/gitpod/v1/workspace_pb";

export function WorkspaceStatusIndicator({ status }: { status?: WorkspaceStatus }) {
const state: WorkspacePhase_Phase = status?.phase?.name || WorkspacePhase_Phase.STOPPED;
const state: WorkspacePhase_Phase = status?.phase?.name ?? WorkspacePhase_Phase.STOPPED;
const conditions = status?.conditions;
let stateClassName = "rounded-full w-3 h-3 text-sm align-middle";
switch (state) {
Expand All @@ -29,6 +29,10 @@ export function WorkspaceStatusIndicator({ status }: { status?: WorkspaceStatus
stateClassName += " bg-red-400";
break;
}
case WorkspacePhase_Phase.UNSPECIFIED: {
stateClassName += " bg-red-400";
break;
}
default: {
stateClassName += " bg-kumquat-ripe animate-pulse";
break;
Expand Down

0 comments on commit 5718585

Please sign in to comment.