import { notFound } from 'next/navigation';
import { getPageData } from "@/utils/data";
import Presentation from "@/components/presentation/Presentation";

export default async function PresentationPage({ params }) {
  const resolvedParams = await params;
  const slugArr = resolvedParams.slug;

  const { data, error } = await getPageData({
    slug_list: slugArr,
    downloadFiles: true
  });

  if (error || !data) {
    notFound();
  }

  return <Presentation data={data} />;
}
