update filter
This commit is contained in:
@@ -147,6 +147,7 @@ export default function Component({
|
|||||||
</header>
|
</header>
|
||||||
|
|
||||||
<Outlet />
|
<Outlet />
|
||||||
|
|
||||||
<Toaster
|
<Toaster
|
||||||
position="top-center"
|
position="top-center"
|
||||||
richColors={true}
|
richColors={true}
|
||||||
|
|||||||
@@ -144,19 +144,14 @@ export function NavUser({
|
|||||||
|
|
||||||
{apps
|
{apps
|
||||||
.filter(({ appId }) => !excludeApps.includes(appId))
|
.filter(({ appId }) => !excludeApps.includes(appId))
|
||||||
.map(({ appId, title, url, scope = [], icon: Icon }) => {
|
.filter(({ scope = [] }) => grantIfHas(scope, userScope))
|
||||||
if (grantIfHas(scope, userScope)) {
|
.map(({ appId, title, url, icon: Icon }) => (
|
||||||
return (
|
<DropdownMenuItem key={appId} asChild>
|
||||||
<DropdownMenuItem key={appId} asChild>
|
<Link to={url} className="cursor-pointer">
|
||||||
<Link to={url} className="cursor-pointer">
|
<Icon /> {title}
|
||||||
<Icon /> {title}
|
</Link>
|
||||||
</Link>
|
</DropdownMenuItem>
|
||||||
</DropdownMenuItem>
|
))}
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
return <></>
|
|
||||||
})}
|
|
||||||
</DropdownMenuGroup>
|
</DropdownMenuGroup>
|
||||||
|
|
||||||
<DropdownMenuSeparator />
|
<DropdownMenuSeparator />
|
||||||
|
|||||||
Reference in New Issue
Block a user