import Image from 'next/image'; import Link from 'next/link'; import { auth, signOut } from '@/lib/auth'; /** Extended as each page lands, so nothing in the bar leads nowhere. */ const NAV = [ { href: '/admin', label: 'Tableau de bord' }, { href: '/admin/horaires', label: 'Horaires' }, { href: '/admin/exceptions', label: 'Exceptions' }, { href: '/admin/vacances', label: 'Vacances' }, { href: '/admin/messages', label: 'Messages' }, ]; /** * The admin shell. * * The middleware has already established that there is a session by the time * this renders; the call here is only to know who it is. Navigation links are * added as their pages land, so nothing in the bar leads nowhere. */ export default async function AdminLayout({ children }: { children: React.ReactNode }) { const session = await auth(); const email = session?.user?.email ?? ''; const isAdmin = session?.user?.role === 'admin'; return (