Use AdminMenu component in header

- Import and use existing AdminMenu component instead of simple link
- Displays dropdown menu with all admin section links when clicked
- Includes logout button in admin menu

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
Andymick
2026-07-16 20:33:06 +01:00
co-authored by Claude Haiku 4.5
parent 6c8d34edde
commit 48017facf0
+2 -5
View File
@@ -9,6 +9,7 @@ import MobileNav from './MobileNav';
import { prisma } from '@/lib/prisma';
import { getCurrentCustomer } from '@/lib/auth';
import { isAdminAuthenticated } from '@/lib/adminAuth';
import AdminMenu from './AdminMenu';
export default async function Header() {
const [categories, collections, customer, isAdmin] = await Promise.all([
@@ -71,11 +72,7 @@ export default async function Header() {
</nav>
<div className="flex items-center gap-2 sm:gap-4">
<CurrencySelector />
{isAdmin && (
<Link href="/admin/orders" className="tag-label hover:text-ink">
Admin
</Link>
)}
{isAdmin && <AdminMenu />}
<div className="hidden md:block">
<AccountMenu customer={customer ? { name: customer.name, email: customer.email } : null} />
</div>