import type { Metadata } from "next";
import { notFound } from "next/navigation";
import { CreatorParticipantDeliverablesPage } from "@/components/dashboard/CreatorParticipantDeliverablesPage";

export const metadata: Metadata = {
  title: "Campaign deliverables | Postvertise",
  description: "Submit and track deliverables for a joined campaign.",
};

type PageProps = {
  params: Promise<{ participantId: string }>;
};

export default async function Page({ params }: PageProps) {
  const { participantId: raw } = await params;
  const participantId = Number(raw);
  if (!Number.isInteger(participantId) || participantId < 1) {
    notFound();
  }

  return <CreatorParticipantDeliverablesPage participantId={participantId} />;
}
