diff --git a/src/components/Header.tsx b/src/components/Header.tsx index 98f3ed0..5eb428a 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -8,15 +8,17 @@ import CurrencySelector from './CurrencySelector'; import MobileNav from './MobileNav'; import { prisma } from '@/lib/prisma'; import { getCurrentCustomer } from '@/lib/auth'; +import { isAdminAuthenticated } from '@/lib/adminAuth'; export default async function Header() { - const [categories, collections, customer] = await Promise.all([ + const [categories, collections, customer, isAdmin] = await Promise.all([ prisma.category.findMany({ where: { showOnPersonalised: true }, orderBy: { name: 'asc' }, }), prisma.collection.findMany({ orderBy: { name: 'asc' } }), getCurrentCustomer(), + isAdminAuthenticated(), ]); const personalisedLinks = [ { href: '/made-to-order', label: 'Shop all' }, @@ -69,6 +71,11 @@ export default async function Header() {