File tree 1 file changed +10
-2
lines changed
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -150,6 +150,7 @@ function App() {
150
150
151
151
const [ loading , setLoading ] = useState < boolean > ( true ) ;
152
152
const [ isWhatsNewShown , setWhatsNewShown ] = useState ( false ) ;
153
+ const [ showUserIdePreference , setShowUserIdePreference ] = useState ( false ) ;
153
154
const [ isSetupRequired , setSetupRequired ] = useState ( false ) ;
154
155
const history = useHistory ( ) ;
155
156
@@ -492,16 +493,23 @@ function App() {
492
493
// Prefix with `/#referrer` will specify an IDE for workspace
493
494
// We don't need to show IDE preference in this case
494
495
const shouldUserIdePreferenceShown = User . isOnboardingUser ( user ) && ! hash . startsWith ( ContextURL . REFERRER_PREFIX ) ;
496
+ if ( shouldUserIdePreferenceShown !== showUserIdePreference ) {
497
+ setShowUserIdePreference ( shouldUserIdePreferenceShown ) ;
498
+ }
495
499
496
500
const isCreation = window . location . pathname === "/" && hash !== "" ;
497
501
const isWsStart = / \/ s t a r t \/ ? / . test ( window . location . pathname ) && hash !== "" ;
498
502
if ( isWhatsNewShown ) {
499
503
toRender = < WhatsNew onClose = { ( ) => setWhatsNewShown ( false ) } /> ;
500
504
} else if ( isCreation ) {
501
- if ( shouldUserIdePreferenceShown ) {
505
+ if ( showUserIdePreference ) {
502
506
toRender = (
503
507
< StartPage phase = { StartPhase . Checking } >
504
- < SelectIDEModal />
508
+ < SelectIDEModal
509
+ onClose = { ( ) => {
510
+ setShowUserIdePreference ( false ) ;
511
+ } }
512
+ />
505
513
</ StartPage >
506
514
) ;
507
515
} else {
You can’t perform that action at this time.
0 commit comments