mirror of
https://github.com/logto-io/logto.git
synced 2025-01-06 20:40:08 -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]
|
[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.
|
// 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.
|
// This is a fallback for the corner case that all the scopes are already granted.
|
||||||
if (
|
if (!userScopesData?.length && !resourceScopes?.length) {
|
||||||
!isDevFeaturesEnabled && // Todo @xiaoyijun remove dev feature flag
|
|
||||||
!userScopesData?.length &&
|
|
||||||
!resourceScopes?.length
|
|
||||||
) {
|
|
||||||
return showTerms ? (
|
return showTerms ? (
|
||||||
<div className={className}>
|
<div className={className}>
|
||||||
<Trans
|
<Trans
|
||||||
|
|
Loading…
Reference in a new issue