diff --git a/src/app/components/nav/Header.tsx b/src/app/components/nav/Header.tsx index 10af093..6279fe5 100644 --- a/src/app/components/nav/Header.tsx +++ b/src/app/components/nav/Header.tsx @@ -187,15 +187,22 @@ export default function Header() { const isLoggedIn = !!user const userPresent = mounted && isLoggedIn + // NEW: detect admin role across common shapes + const isAdmin = + !!user && + ( + (user as any)?.role === 'admin' || + (user as any)?.userType === 'admin' || + (user as any)?.isAdmin === true || + ((user as any)?.roles?.includes?.('admin')) + ) + return (
- {/* REMOVE sub header bar */} - {/* ...existing code... */} - {/* Deleted previous Sub header nav for Referral Management */} - {/* ...existing code... */} + {/* Admin subheader (gold) - centered */} + {userPresent && isAdmin && ( +
+
+
+ + Admin Navigation + + + + +
+
+
+ )} + {/* Mobile dialog and rest of header */}