Skip to content

Commit 26d0561

Browse files
committed
[dashboard] fix workspace start stuck in checking during ide onboarding
1 parent 3939796 commit 26d0561

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

components/dashboard/src/App.tsx

Lines changed: 9 additions & 1 deletion
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,6 +493,9 @@ 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 !== "";
@@ -501,7 +505,11 @@ function App() {
501505
if (shouldUserIdePreferenceShown) {
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)