Skip to content

Commit 354dc2b

Browse files
Devansu-Yadavgtsiolis
authored andcommitted
minor: hide latest ide alert on workspace timeout
1 parent 5ee2a66 commit 354dc2b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

components/dashboard/src/start/StartWorkspace.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,7 @@ export default class StartWorkspace extends React.Component<StartWorkspaceProps,
450450
const withPrebuild = WithPrebuild.is(this.state.workspace?.context);
451451
let phase: StartPhase | undefined = StartPhase.Preparing;
452452
let title = undefined;
453+
let hideLatestIdeWarningOnWorkspaceTimeout = undefined;
453454
let statusMessage = !!error ? undefined : <p className="text-base text-gray-400">Preparing workspace …</p>;
454455
const contextURL = ContextURL.getNormalizedURL(this.state.workspace)?.toString();
455456
const useLatest = !!this.state.workspaceInstance?.configuration?.ideConfig?.useLatest;
@@ -677,6 +678,7 @@ export default class StartWorkspace extends React.Component<StartWorkspaceProps,
677678
}
678679
if (!isPrebuild && this.state.workspaceInstance.status.conditions.timeout) {
679680
title = "Timed Out";
681+
hideLatestIdeWarningOnWorkspaceTimeout = useLatest;
680682
}
681683
statusMessage = (
682684
<div>
@@ -710,7 +712,12 @@ export default class StartWorkspace extends React.Component<StartWorkspaceProps,
710712
break;
711713
}
712714
return (
713-
<StartPage phase={phase} error={error} title={title} showLatestIdeWarning={useLatest}>
715+
<StartPage
716+
phase={phase}
717+
error={error}
718+
title={title}
719+
showLatestIdeWarning={hideLatestIdeWarningOnWorkspaceTimeout ? !useLatest : useLatest}
720+
>
714721
{statusMessage}
715722
</StartPage>
716723
);

0 commit comments

Comments
 (0)