0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00

fix(console): hide org resource scopes tab from 3rd-party app modal (#5824)

This commit is contained in:
Xiao Yijun 2024-05-06 12:03:38 +08:00 committed by GitHub
parent b4b8015db5
commit c1c8410093
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -47,21 +47,28 @@ function ApplicationScopesAssignmentModal({ isOpen, onClose, applicationId }: Pr
const tabs = useMemo(
() =>
Object.values(permissionTabs).map(({ title, key }) => {
const selectedDataCount = scopesAssignment[key].selectedData.length;
Object.values(permissionTabs)
/**
* Hide the organization resource scopes tab since the feature is not ready.
* We don't need the `isDevFeaturesEnabled` flag since the feature will change the UI.
* Todo @xiaoyijun Implement the new organization resource scopes feature. LOG-8823
*/
.filter(({ key }) => key !== ApplicationUserConsentScopeType.OrganizationResourceScopes)
.map(({ title, key }) => {
const selectedDataCount = scopesAssignment[key].selectedData.length;
return (
<TabNavItem
key={key}
isActive={key === activeTab}
onClick={() => {
setActiveTab(key);
}}
>
{`${t(title)}${selectedDataCount ? ` (${selectedDataCount})` : ''}`}
</TabNavItem>
);
}),
return (
<TabNavItem
key={key}
isActive={key === activeTab}
onClick={() => {
setActiveTab(key);
}}
>
{`${t(title)}${selectedDataCount ? ` (${selectedDataCount})` : ''}`}
</TabNavItem>
);
}),
[activeTab, scopesAssignment, setActiveTab, t]
);