Skip to content

Commit 5fadd8a

Browse files
mustard-mhroboquat
authored andcommitted
[dashboard] fix workspace start stuck in checking during ide onboarding
1 parent e86dc4a commit 5fadd8a

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

components/dashboard/src/App.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ function App() {
150150

151151
const [loading, setLoading] = useState<boolean>(true);
152152
const [isWhatsNewShown, setWhatsNewShown] = useState(false);
153+
const [showUserIdePreference, setShowUserIdePreference] = useState(false);
153154
const [isSetupRequired, setSetupRequired] = useState(false);
154155
const history = useHistory();
155156

@@ -492,16 +493,23 @@ function App() {
492493
// Prefix with `/#referrer` will specify an IDE for workspace
493494
// We don't need to show IDE preference in this case
494495
const shouldUserIdePreferenceShown = User.isOnboardingUser(user) && !hash.startsWith(ContextURL.REFERRER_PREFIX);
496+
if (shouldUserIdePreferenceShown !== showUserIdePreference) {
497+
setShowUserIdePreference(shouldUserIdePreferenceShown);
498+
}
495499

496500
const isCreation = window.location.pathname === "/" && hash !== "";
497501
const isWsStart = /\/start\/?/.test(window.location.pathname) && hash !== "";
498502
if (isWhatsNewShown) {
499503
toRender = <WhatsNew onClose={() => setWhatsNewShown(false)} />;
500504
} else if (isCreation) {
501-
if (shouldUserIdePreferenceShown) {
505+
if (showUserIdePreference) {
502506
toRender = (
503507
<StartPage phase={StartPhase.Checking}>
504-
<SelectIDEModal />
508+
<SelectIDEModal
509+
onClose={() => {
510+
setShowUserIdePreference(false);
511+
}}
512+
/>
505513
</StartPage>
506514
);
507515
} else {

0 commit comments

Comments
 (0)