Skip to content

Commit 3ffa28a

Browse files
fix: deployment state color mismatch when isReady is false (#1012)
Previously, when isReady was false, the component would display the "Deploying" message but use the color of the actual state, causing incorrect color representation (e.g., "Deploying" in red when state was ERROR). Now both the message and color are determined by displayedState, ensuring they are always synchronized. When isReady is false, both use DEPLOYING (muted gray). Signed-off-by: Omar <omar.brbutovic@secomind.com>
1 parent 396d995 commit 3ffa28a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

frontend/src/components/DeploymentState.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,15 +127,15 @@ const DeploymentStateComponent = ({
127127
state,
128128
isReady,
129129
}: DeploymentStateComponentProps) => {
130+
const displayedState = isReady ? state : "DEPLOYING";
131+
130132
return (
131133
<div className="d-flex align-items-center">
132134
<Icon
133135
icon={displaySpinner(state, isReady) ? "spinner" : "circle"}
134-
className={`me-2 ${stateColors[state]} ${displaySpinner(state, isReady) ? "fa-spin" : ""}`}
135-
/>
136-
<FormattedMessage
137-
id={isReady ? stateMessages[state].id : stateMessages["DEPLOYING"].id}
136+
className={`me-2 ${stateColors[displayedState]} ${displaySpinner(state, isReady) ? "fa-spin" : ""}`}
138137
/>
138+
<FormattedMessage id={stateMessages[displayedState].id} />
139139
</div>
140140
);
141141
};

0 commit comments

Comments
 (0)