added isLinkedAccountEnabled (#21030)

fixes: #20942
This commit is contained in:
Erik Jan de Wit 2023-06-19 08:36:15 +02:00 committed by GitHub
parent 310aa43f16
commit 4d84725d28
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -54,6 +54,7 @@ const menuItems: MenuItem[] = [
{
label: "linkedAccounts",
path: "account-security/linked-accounts",
isHidden: !environment.features.isLinkedAccountsEnabled,
},
],
},
@ -115,7 +116,9 @@ function NavMenuItem({ menuItem }: NavMenuItemProps) {
isActive={isActive}
isExpanded={isActive}
>
{menuItem.children.map((child) => (
{menuItem.children
.filter((menuItem) => !menuItem.isHidden)
.map((child) => (
<NavMenuItem key={child.label} menuItem={child} />
))}
</NavExpandable>