Skip to content

Commit

Permalink
fix(experience): hide scope list if no user scopes and resource scopes (
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoyijun authored May 10, 2024
1 parent feae37b commit 266af8c
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 ? (
<div className={className}>
<Trans
Expand Down

0 comments on commit 266af8c

Please sign in to comment.