0
Fork 0
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:
Xiao Yijun 2024-05-10 11:00:26 +08:00 committed by GitHub
parent feae37b9b1
commit 266af8c3d7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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