import { prisma } from "@/lib/prisma";
import { ProjectForm } from "@/components/dashboard/projects/ProjectForm";
import { notFound } from "next/navigation";

export const dynamic = "force-dynamic";

export default async function EditProjectPage({ 
  params 
}: { 
  params: Promise<{ id: string }> 
}) {
  const { id } = await params;
  const project = await prisma.project.findUnique({
    where: { id },
  });

  if (!project) notFound();

  return (
    <div className="p-6">
      <ProjectForm initialData={project} />
    </div>
  );
}
