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

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

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

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

export default PrivacyPage;
