]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-19631 Preserve state when pressing back (#8623)
authorAndrey Luiz <andrey.luiz@sonarsource.com>
Tue, 20 Jun 2023 08:51:49 +0000 (10:51 +0200)
committersonartech <sonartech@sonarsource.com>
Tue, 20 Jun 2023 13:10:18 +0000 (13:10 +0000)
server/sonar-web/src/main/js/apps/create/project/CreateProjectPage.tsx

index fdb66a0c77b577154c8189ba9e749340cbd55553..29f69c240c4c259469d2ad95fe3ce0c93cced437 100644 (file)
@@ -49,6 +49,7 @@ import ManualProjectCreate from './manual/ManualProjectCreate';
 import './style.css';
 import { CreateProjectApiCallback, CreateProjectModes } from './types';
 import { addGlobalSuccessMessage } from '../../../helpers/globalMessages';
+import classNames from 'classnames';
 
 export interface CreateProjectPageProps extends WithAvailableFeaturesProps {
   appState: AppState;
@@ -352,7 +353,12 @@ export class CreateProjectPage extends React.PureComponent<CreateProjectPageProp
         <Helmet title={translate('onboarding.create_project.select_method')} titleTemplate="%s" />
         <A11ySkipTarget anchor="create_project_main" />
         <div className="page page-limited huge-spacer-bottom position-relative" id="create-project">
-          {isProjectSetupDone ? this.renderNcdSelection() : this.renderProjectCreation(mode)}
+          <div className={classNames({ 'sw-hidden': isProjectSetupDone })}>
+            {this.renderProjectCreation(mode)}
+          </div>
+          <div className={classNames({ 'sw-hidden': !isProjectSetupDone })}>
+            {this.renderNcdSelection()}
+          </div>
 
           {creatingAlmDefinition && (
             <AlmBindingDefinitionForm