import { prisma } from "@/lib/prisma";
import { ExperienceForm } from "@/components/dashboard/experience/ExperienceForm";
import { notFound } from "next/navigation";

export const dynamic = "force-dynamic";

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

  if (!experience) notFound();

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