]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-23050 Remove one extra close button when restoring QP
authorstanislavh <stanislav.honcharov@sonarsource.com>
Fri, 20 Sep 2024 12:08:28 +0000 (14:08 +0200)
committersonartech <sonartech@sonarsource.com>
Fri, 20 Sep 2024 20:02:37 +0000 (20:02 +0000)
server/sonar-web/src/main/js/apps/quality-profiles/home/RestoreProfileForm.tsx

index 224775aa7e11210bdc7f03295e03dcd66ae1e784..18f5c47d627330934f8a162bb2761859a3f5892d 100644 (file)
@@ -116,7 +116,7 @@ export default function RestoreProfileForm({ onClose, onRestore }: Readonly<Prop
         </form>
       }
       primaryButton={
-        ruleSuccesses == null ? (
+        ruleSuccesses == null && (
           <Button
             isDisabled={loading}
             isLoading={loading}
@@ -126,10 +126,6 @@ export default function RestoreProfileForm({ onClose, onRestore }: Readonly<Prop
           >
             {intl.formatMessage({ id: 'restore' })}
           </Button>
-        ) : (
-          <Button id="restore-profile-cancel" onClick={onClose} variety={ButtonVariety.Primary}>
-            {intl.formatMessage({ id: 'close' })}
-          </Button>
         )
       }
       secondaryButtonLabel={intl.formatMessage({ id: ruleSuccesses == null ? 'cancel' : 'close' })}