diff options
author | Viktor Vorona <viktor.vorona@sonarsource.com> | 2024-09-12 17:02:57 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2024-09-13 20:02:35 +0000 |
commit | 4aa45bbc641827cf55b1c01170a405f2d73c1182 (patch) | |
tree | 050c7321f044f34d8b2b318b9918a93e83169736 /server/sonar-web/src/main/js/apps/quality-profiles | |
parent | 4674af96f13e9f48a6a371ddd07c21ae2859c66d (diff) | |
download | sonarqube-4aa45bbc641827cf55b1c01170a405f2d73c1182.tar.gz sonarqube-4aa45bbc641827cf55b1c01170a405f2d73c1182.zip |
SONAR-22831 Migrate Change Rule details to echoes components
Diffstat (limited to 'server/sonar-web/src/main/js/apps/quality-profiles')
-rw-r--r-- | server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResultActivation.tsx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResultActivation.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResultActivation.tsx index e12115032a1..8bb71661a4d 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResultActivation.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResultActivation.tsx @@ -39,7 +39,7 @@ export default function ComparisonResultActivation(props: React.PropsWithChildre const [rule, setRule] = React.useState<RuleDetails>(); const intl = useIntl(); - const isOpen = state === 'open' && rule; + const isOpen = state === 'open' && !!rule; const activateRuleMsg = intl.formatMessage( { id: 'quality_profiles.comparison.activate_rule' }, @@ -71,8 +71,10 @@ export default function ComparisonResultActivation(props: React.PropsWithChildre </Button> </Tooltip> - {isOpen && ( + {rule && ( <ActivationFormModal + isOpen={isOpen} + onOpenChange={(open) => setState(open ? 'open' : 'closed')} modalHeader={intl.formatMessage({ id: 'coding_rules.activate_in_quality_profile' })} onClose={() => { setState('closed'); |