From 5ed8cae7a3a8b3329817eaf0c4de8dd87ae6f7c9 Mon Sep 17 00:00:00 2001 From: Xiao Yijun Date: Fri, 10 May 2024 10:32:50 +0800 Subject: [PATCH] fix(experience): hide scope list if no user scopes and resource scopes --- .../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 87b1bdb66cb..37929f119f6 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 ? (