From 4d84725d28ce3f64d53ca94ff9062a26d93fda56 Mon Sep 17 00:00:00 2001 From: Erik Jan de Wit Date: Mon, 19 Jun 2023 08:36:15 +0200 Subject: [PATCH] added `isLinkedAccountEnabled` (#21030) fixes: #20942 --- js/apps/account-ui/src/root/PageNav.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/js/apps/account-ui/src/root/PageNav.tsx b/js/apps/account-ui/src/root/PageNav.tsx index 002b3aca83..6f07d655c0 100644 --- a/js/apps/account-ui/src/root/PageNav.tsx +++ b/js/apps/account-ui/src/root/PageNav.tsx @@ -54,6 +54,7 @@ const menuItems: MenuItem[] = [ { label: "linkedAccounts", path: "account-security/linked-accounts", + isHidden: !environment.features.isLinkedAccountsEnabled, }, ], }, @@ -115,9 +116,11 @@ function NavMenuItem({ menuItem }: NavMenuItemProps) { isActive={isActive} isExpanded={isActive} > - {menuItem.children.map((child) => ( - - ))} + {menuItem.children + .filter((menuItem) => !menuItem.isHidden) + .map((child) => ( + + ))} ); }