0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-01-06 20:40:08 -05:00

fix(console): hide the organization row group (#5286)

hide the organization row group is the data is empty
This commit is contained in:
simeng-li 2024-01-25 12:37:18 +08:00 committed by GitHub
parent 9d15d88d28
commit 3026413c23
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 1 deletions

View file

@ -6,7 +6,10 @@
height: _.unit(9);
td {
font: var(--font-label-2);
color: var(--color-text-secondary);
background-color: var(--color-layer-light);
padding-top: _.unit(2);
padding-bottom: _.unit(2);
}
}

View file

@ -93,7 +93,12 @@ const useScopesTable = () => {
})
);
return [userScopesGroup, ...resourceScopesGroups, organizationScopesGroup];
return [
userScopesGroup,
...resourceScopesGroups,
// Hide the organization scopes group if there is no organization scopes
...(organizationScopesGroup.data.length > 0 ? [organizationScopesGroup] : []),
];
},
[experienceT, t]
);