From ddec9fc44a084b48f0fb6efa17a9ec9708010c0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Rafael=20Siqueira?= Date: Wed, 3 Dec 2025 01:29:51 -0300 Subject: [PATCH] update filter --- apps/saladeaula.digital/app/routes/layout.tsx | 1 + packages/ui/src/components/nav-user.tsx | 21 +++++++------------ 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/apps/saladeaula.digital/app/routes/layout.tsx b/apps/saladeaula.digital/app/routes/layout.tsx index 7f8eb58..7ba68f6 100644 --- a/apps/saladeaula.digital/app/routes/layout.tsx +++ b/apps/saladeaula.digital/app/routes/layout.tsx @@ -147,6 +147,7 @@ export default function Component({ + !excludeApps.includes(appId)) - .map(({ appId, title, url, scope = [], icon: Icon }) => { - if (grantIfHas(scope, userScope)) { - return ( - - - {title} - - - ) - } - - return <> - })} + .filter(({ scope = [] }) => grantIfHas(scope, userScope)) + .map(({ appId, title, url, icon: Icon }) => ( + + + {title} + + + ))}