import { NavLink, useNavigate } from "react-router" import { LayoutDashboard, BookOpen, FolderOpen, TreePine, Users, MessageSquare, Settings, LogOut, FileCheck, AlertCircle, Shield, } from "lucide-react" import { cn } from "@/lib/utils" import { useAuth } from "@/hooks/use-auth" const navItems = [ { to: "/", label: "数据看板", icon: LayoutDashboard, end: true }, { to: "/questions", label: "题库管理", icon: BookOpen }, { to: "/questions?source=ugc", label: "UGC 审核", icon: FileCheck }, { to: "/categories", label: "分类管理", icon: FolderOpen }, { to: "/skill-tree", label: "技能树", icon: TreePine }, { to: "/users", label: "用户管理", icon: Users }, { to: "/feedback", label: "用户反馈", icon: MessageSquare }, { to: "/reports", label: "举报处理", icon: AlertCircle }, { to: "/admins", label: "管理员", icon: Shield }, { to: "/settings", label: "系统设置", icon: Settings }, ] export function Sidebar() { const { logout } = useAuth() const navigate = useNavigate() function handleLogout() { logout() navigate("/login") } return ( ) }