From 266af8c3d7e5b0a6b9549d86dbc436ce1afecf03 Mon Sep 17 00:00:00 2001 From: Xiao Yijun Date: Fri, 10 May 2024 11:00:26 +0800 Subject: [PATCH] fix(experience): hide scope list if no user scopes and resource scopes (#5840) --- .../src/pages/Consent/ScopesListCard/index.tsx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/experience/src/pages/Consent/ScopesListCard/index.tsx b/packages/experience/src/pages/Consent/ScopesListCard/index.tsx index 87b1bdb66..37929f119 100644 --- a/packages/experience/src/pages/Consent/ScopesListCard/index.tsx +++ b/packages/experience/src/pages/Consent/ScopesListCard/index.tsx @@ -45,15 +45,12 @@ const ScopesListCard = ({ [t, userScopes] ); - const showTerms = Boolean(termsUrl ?? privacyUrl); + // Todo @xiaoyijun remove dev feature flag and authorization agreement from this component + const showTerms = !isDevFeaturesEnabled && Boolean(termsUrl ?? privacyUrl); // If there is no user scopes and resource scopes, we don't need to show the scopes list. // This is a fallback for the corner case that all the scopes are already granted. - if ( - !isDevFeaturesEnabled && // Todo @xiaoyijun remove dev feature flag - !userScopesData?.length && - !resourceScopes?.length - ) { + if (!userScopesData?.length && !resourceScopes?.length) { return showTerms ? (