import type { ComponentType } from "react"; import { LayoutDashboard, Users, Building2, Coins, type LucideIcon } from "lucide-react"; import { Overview } from "./pages/Overview"; import { Team } from "./pages/Team"; import { Orgs } from "./pages/Orgs"; import { Usage } from "./pages/Usage"; // 路由注册表(单一事实源):导航与内容都从这派生(与 admin 同款模式)。 export interface RouteDef { path: string; label: string; icon: LucideIcon; page: ComponentType; } export const routes: RouteDef[] = [ { path: "/overview", label: "概览", icon: LayoutDashboard, page: Overview }, { path: "/team", label: "团队", icon: Users, page: Team }, { path: "/orgs", label: "组织", icon: Building2, page: Orgs }, { path: "/usage", label: "用量与账单", icon: Coins, page: Usage }, ]; export const defaultPath = routes[0].path;