From 4aa45bbc641827cf55b1c01170a405f2d73c1182 Mon Sep 17 00:00:00 2001 From: Viktor Vorona Date: Thu, 12 Sep 2024 17:02:57 +0200 Subject: SONAR-22831 Migrate Change Rule details to echoes components --- .../js/apps/quality-profiles/compare/ComparisonResultActivation.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'server/sonar-web/src/main/js/apps/quality-profiles') 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(); 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 - {isOpen && ( + {rule && ( setState(open ? 'open' : 'closed')} modalHeader={intl.formatMessage({ id: 'coding_rules.activate_in_quality_profile' })} onClose={() => { setState('closed'); -- cgit v1.2.3