mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -05:00
fix(experience): hide scope list if no user scopes and resource scopes (#5840)
This commit is contained in:
parent
feae37b9b1
commit
266af8c3d7
1 changed files with 3 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue