mirror of
https://github.com/logto-io/logto.git
synced 2025-01-06 20:40:08 -05:00
fix(console): hide org resource scopes tab from 3rd-party app modal (#5824)
This commit is contained in:
parent
b4b8015db5
commit
c1c8410093
1 changed files with 21 additions and 14 deletions
|
@ -47,21 +47,28 @@ function ApplicationScopesAssignmentModal({ isOpen, onClose, applicationId }: Pr
|
||||||
|
|
||||||
const tabs = useMemo(
|
const tabs = useMemo(
|
||||||
() =>
|
() =>
|
||||||
Object.values(permissionTabs).map(({ title, key }) => {
|
Object.values(permissionTabs)
|
||||||
const selectedDataCount = scopesAssignment[key].selectedData.length;
|
/**
|
||||||
|
* 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 (
|
return (
|
||||||
<TabNavItem
|
<TabNavItem
|
||||||
key={key}
|
key={key}
|
||||||
isActive={key === activeTab}
|
isActive={key === activeTab}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setActiveTab(key);
|
setActiveTab(key);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{`${t(title)}${selectedDataCount ? ` (${selectedDataCount})` : ''}`}
|
{`${t(title)}${selectedDataCount ? ` (${selectedDataCount})` : ''}`}
|
||||||
</TabNavItem>
|
</TabNavItem>
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
[activeTab, scopesAssignment, setActiveTab, t]
|
[activeTab, scopesAssignment, setActiveTab, t]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue