import { getCustomerUser } from '@/app/lib/lumen-auth'; import { isAdmin } from '@/app/lib/admin'; import ButtonIcon from './ButtonIcon'; // Shared dark title bar — brand wordmark + nav. Rendered on every page // via the root layout. Reads the Supabase session server-side so the // Sign in / Sign out link reflects current state without a client-side // flash. Admin users also get a quick "Admin" link to /admin. // // Two navs are rendered from the same server data: // • .sitebar__nav — the inline desktop row (unchanged; hidden ≤768px) // • .sitebar__menu — a pure-CSS
disclosure for mobile, so the // links collapse behind a hamburger instead of // wrapping. No client JS / hydration. export async function SiteHeader() { const user = await getCustomerUser(); const signedIn = !!user; const admin = signedIn && isAdmin(user.email); const accountHref = admin ? '/admin' : '/orders'; const accountLabel = admin ? 'Admin' : 'My orders'; return (
Lumen & Gesso
Free Studio Gallery Reviews Careers
); }