import type { Metadata } from "next"; import { notFound } from "next/navigation"; import { FileText } from "lucide-react"; import { GitPanel } from "@/components/GitPanel"; import { NotesPanel } from "@/components/NotesPanel"; import { ProjectHeader } from "@/components/ProjectHeader"; import { prisma } from "@/lib/db"; import { connectionSafeSelect, projectDetailInclude } from "@/lib/projects"; import type { ConnectionSafe, ProjectDetail } from "@/types"; export const dynamic = "force-dynamic"; type PageProps = { params: Promise<{ id: string }> }; export async function generateMetadata({ params }: PageProps): Promise { const { id } = await params; const project = await prisma.project.findUnique({ where: { id }, select: { name: true, summary: true }, }); return { title: project?.name ?? "Projekt", description: project?.summary ?? undefined, }; } export default async function ProjectPage({ params }: PageProps) { const { id } = await params; const [project, connections] = await Promise.all([ prisma.project.findUnique({ where: { id }, include: projectDetailInclude }), prisma.gitConnection.findMany({ select: connectionSafeSelect, orderBy: { name: "asc" } }), ]); if (!project) notFound(); const detail = project as unknown as ProjectDetail; return (

Beschreibung

{detail.description ? (

{detail.description}

) : (

Keine Beschreibung hinterlegt. Ueber „Bearbeiten“ kannst du die Idee ausformulieren.

)}
); }