fix: add type assertion for role includes check in Navbar
Add 'as any' type assertion to user.role in NAV_ITEMS filter to resolve TypeScript compilation error. The 'as const' assertion on NAV_ITEMS makes the roles arrays readonly with literal types, which TypeScript cannot match with the User role type without the assertion. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
5708e8f514
commit
a363e0ab7f
|
|
@ -13,7 +13,7 @@ export default function Navbar() {
|
|||
|
||||
const filteredNavItems = NAV_ITEMS.filter((item) => {
|
||||
if (!user) return false;
|
||||
return item.roles.includes(user.role);
|
||||
return item.roles.includes(user.role as any);
|
||||
});
|
||||
|
||||
const isActive = (href: string) => pathname === href;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user