'use client'; import Link from 'next/link'; import { usePathname, useRouter } from 'next/navigation'; import { LayoutDashboard, Image as ImageIcon, Briefcase, Mail, LogOut } from 'lucide-react'; import { logout } from '../actions'; const navItems = [ { name: 'Dashboard', href: '/admin', icon: LayoutDashboard }, { name: 'Galeri', href: '/admin/gallery', icon: ImageIcon }, { name: 'Hizmetler', href: '/admin/services', icon: Briefcase }, { name: 'İletişim', href: '/admin/contact', icon: Mail }, ]; export function Sidebar() { const pathname = usePathname(); const router = useRouter(); const handleLogout = async () => { await logout(); router.push('/admin/login'); }; return ( ); }