"use client"; import Link from 'next/link'; import { usePathname } from 'next/navigation'; import { LayoutDashboard, Users, MessageSquare, BookOpen, LogOut, ShieldCheck, BarChart3, Flag, CreditCard, Settings, Globe, FileText, Briefcase, Tags, Image as ImageIcon } from 'lucide-react'; const menuItems = [ { name: 'Dashboard', icon: LayoutDashboard, href: '/dashboard' }, { name: 'Utilisateurs', icon: Users, href: '/users' }, { name: 'Metrics & Analytics', icon: BarChart3, href: '/metrics' }, { name: 'Commentaires', icon: MessageSquare, href: '/comments' }, { name: 'Modération', icon: Flag, href: '/moderation' }, { name: 'Actualités & Interviews', icon: BookOpen, href: '/actualites' }, { name: 'Forfaits & Services', icon: CreditCard, href: '/plans' }, { name: 'Taxonomies', icon: Tags, href: '/taxonomies' }, { name: 'Pays', icon: Globe, href: '/countries' }, { name: 'Bannière', icon: ImageIcon, href: '/slides' }, { name: 'Documents Légaux', icon: FileText, href: '/legal' }, { name: 'Configuration', icon: Settings, href: '/settings' }, ]; import { useState, useEffect } from 'react'; import { getPendingVerificationCount } from '@/app/actions/business'; export default function Sidebar() { const pathname = usePathname(); const [pendingCount, setPendingCount] = useState(0); useEffect(() => { getPendingVerificationCount().then(setPendingCount); }, [pathname]); // Refresh on navigation return (