import Link from "next/link"; import { BookOpen, Plus } from "lucide-react"; import { AppShell } from "@/components/AppShell"; import { ProjectLibrary } from "@/components/projects/ProjectLibrary"; import { EmptyState } from "@/components/ui/EmptyState"; import { PageHeader } from "@/components/ui/PageHeader"; import { fetchProjects } from "@/lib/api/server"; import type { ProjectResponse } from "@/lib/api/types"; import { buttonClass } from "@/lib/ui/variants"; // 作品库(Dashboard 入口,UX §6.1)。Server Component 读取。 export default async function DashboardPage() { let projects: ProjectResponse[] = []; let loadError = false; try { const data = await fetchProjects(); projects = data.projects ?? []; } catch { loadError = true; } return (
); }