"use client"; import Link from "next/link"; import { usePathname, useRouter } from "next/navigation"; import { createClient } from "@/lib/supabase/client"; import { cn } from "@/lib/utils"; interface AdminShellProps { children: React.ReactNode; adminName: string; adminEmail: string; } const navItems = [ { label: "Dashboard", href: "/admin", icon: ( ), exact: true, }, { label: "Candidatures", href: "/admin/candidatures", icon: ( ), }, { label: "Cours", href: "/admin/cours", icon: ( ), }, { label: "Images du site", href: "/admin/images", icon: ( ), }, ]; export default function AdminShell({ children, adminName, adminEmail }: AdminShellProps) { const pathname = usePathname(); const router = useRouter(); const handleLogout = async () => { const supabase = createClient(); await supabase.auth.signOut(); router.push("/login"); router.refresh(); }; return (
{/* Sidebar */} {/* Main content */}
{children}
); }