import { useTranslation } from "~/providers/I18nProvider";
import type { NextPageWithLayout } from "~/pages/_app";
import { useEnforcedSession } from "~/providers/SessionProvider";
import { AreaRiservataLayout } from "~/components/Layout";
import Head from "next/head";
import { AllegatiComp } from "~/components/area-riservata/allegati";
const Allegati: NextPageWithLayout = () => {
  const { t } = useTranslation();
  const session = useEnforcedSession();

  return (
    <>
      <Head>
        <title>{t.heads.area_riservata_titolo}</title>
        <meta name="description" content={t.heads.area_riservata_description} />
      </Head>

      <div className="grow p-4">
        <AllegatiComp userId={session.user.id} isAdmin={session.user.isAdmin} />
      </div>
    </>
  );
};
export default Allegati;

Allegati.getLayout = function getLayout(page) {
  return <AreaRiservataLayout>{page}</AreaRiservataLayout>;
};
