import { prisma } from "@/lib/prisma";
import InterviewForm from "@/components/InterviewForm";
import { notFound } from "next/navigation";

export default async function EditInterviewPage({ params }: { params: { id: string } }) {
  const { id } = params;
  const interview = await prisma.interview.findUnique({
    where: { id },
  });

  if (!interview) {
    notFound();
  }

  return <InterviewForm initialData={interview} />;
}
