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

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

  if (!interview) {
    notFound();
  }

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