import type { ReactNode } from "react"; import Link from "next/link"; import LogoutButton from "@/components/logout-button"; import type { PublicUser } from "@/lib/types"; interface NavigationShellProps { currentUser: PublicUser; activePath: string; title: string; description: string; children: ReactNode; } export default function NavigationShell({ currentUser, activePath, title, description, children, }: NavigationShellProps) { const navigationItems = [ { href: "/studio", label: "生成中心", description: "输入 Prompt,生成并下载图片", }, { href: "/history", label: "历史记录", description: currentUser.role === "admin" ? "查看所有用户生成过的图片" : "回看自己曾经生成的图片", }, ...(currentUser.role === "admin" ? [ { href: "/admin", label: "管理后台", description: "用户、角色和额度配置", }, ] : []), ]; return (

Workspace

{title}

{description}

{children}
); }