"use client" import type React from "react" import { useState } from "react" import Link from "next/link" import { usePathname } from "next/navigation" import { Button } from "@/components/ui/button" import { LayoutDashboard, Users, Settings, LogOut, Menu, X } from "lucide-react" export default function DashboardLayout({ children, }: { children: React.ReactNode }) { const [sidebarOpen, setSidebarOpen] = useState(true) const pathname = usePathname() const navItems = [ { title: "项目管理", href: "/dashboard/projects", icon: , }, { title: "客户池", href: "/dashboard/customers", icon: , }, { title: "管理员权限", href: "/dashboard/admins", icon: , }, ] return (
{/* Mobile sidebar toggle */}
{/* Sidebar */}

超级管理员后台

{/* Main content */}

{navItems.find((item) => pathname.startsWith(item.href))?.title || "仪表盘"}

{children}
) }