"use client"; import Link from "next/link"; import { usePathname, useRouter } from "next/navigation"; import { createClient } from "@/lib/supabase/client"; import { cn } from "@/lib/utils"; import type { Profile } from "@/types/database.types"; interface SidebarProps { user: Profile; } const navItems = [ { label: "Dashboard", href: "/dashboard", icon: ( ), }, { label: "Formations", href: "/formations", icon: ( ), }, { label: "Profil", href: "/profil", icon: ( ), }, ]; export default function Sidebar({ user }: SidebarProps) { const pathname = usePathname(); const router = useRouter(); const handleLogout = async () => { const supabase = createClient(); await supabase.auth.signOut(); router.push("/login"); router.refresh(); }; return ( ); }