Use roles instead of email check for Admin link
cgen-775ad93039114a03b56dd9e2b2d28bde
This commit is contained in:
parent
ba68ae0e79
commit
9c982aec7c
1 changed files with 1 additions and 1 deletions
|
|
@ -61,7 +61,7 @@ export default function Layout({ children }: LayoutProps) {
|
|||
{/* Navigation */}
|
||||
<nav className="hidden md:flex items-center space-x-8">
|
||||
{(() => {
|
||||
const isOwner = user?.email?.toLowerCase() === "mrpiglr@gmail.com";
|
||||
const isOwner = Array.isArray(roles) && roles.includes("owner");
|
||||
const navItems = user
|
||||
? (isOwner ? [{ name: "Admin", href: "/admin" }, ...userNavigation] : userNavigation)
|
||||
: navigation;
|
||||
|
|
|
|||
Loading…
Reference in a new issue