import type { NextPage } from 'next';
import ThankYou from '@/components/ThankYou/ThankYou';
import { fetchSingleTypePageData } from '@/helpers/utilities/fetchAPI';
import StrapiSeo from '@/components/common/seo/StrapiSeo';

const populateFields = ['seo.ogImage', 'seo.multiStructureData', 'content'];

export async function getStaticProps() {
    return await fetchSingleTypePageData(populateFields, 'thank-you');
}

const ThankYouPage: NextPage = ({ data }: any) => {
    return (
        <>
            <StrapiSeo content={data.data?.attributes?.seo} />
            <ThankYou data={data.data?.attributes} />
        </>
    );
};

export default ThankYouPage;
