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

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

export async function getStaticProps() {
    return await fetchSingleTypePageData(populateFields, 'terms-and-condition');
}

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

export default TermsConditionPage;
