"use client"; import * as React from "react"; import { Sidebar, SidebarContent, SidebarFooter, SidebarHeader, SidebarMenu, SidebarMenuButton, SidebarMenuItem, } from "@/components/ui/sidebar"; import { User } from "next-auth"; import { siteConfig } from "@/config/site"; import { NavMain } from "@/components/nav-main"; import { NavUser } from "@/components/nav-user"; import { LifeBuoy, Send, Shield } from "lucide-react"; import { NavSecondary } from "@/components/nav-secondary"; const adminData = { navMain: [ { title: "管理面板", url: "/dashboard", icon: Shield, isActive: true, items: [ { title: "管理员管理", url: "/dashboard/usermanagement/admin" }, { title: "用户管理", url: "/dashboard/usermanagement/guest" }, { title: "教师管理", url: "/dashboard/usermanagement/teacher" }, { title: "题目管理", url: "/dashboard/usermanagement/problem" }, ], }, ], navSecondary: [ { title: "帮助", url: "/", icon: LifeBuoy }, { title: "反馈", url: siteConfig.url.repo.github, icon: Send }, ], }; interface AdminSidebarProps { user: User; } export function AdminSidebar({ user, ...props }: AdminSidebarProps & React.ComponentProps) { const userInfo = { name: user.name ?? "管理员", email: user.email ?? "", avatar: user.image ?? "/avatars/default.jpg", }; return (
Admin 管理后台
); }