import type { NextPage } from 'next';
import dynamic from 'next/dynamic';

import StrapiSeo from '@/components/common/seo/StrapiSeo';
import { fetchSingleTypePageData } from '@/helpers/utilities/fetchAPI';
import Company from '@/components/company/Company';
const populateFields = [
    'seo.ogImage',
    'seo.multiStructureData',
    'hero.image',
    'whyUs.cardContent.icon',
    'brandLogo.icon',
    'mission.image',
    'vision.image',
    'core.icon',
    'process.image',
    'process.cardContent.icon',
    'testimonial.review.profileImage',
    'clients.brandLogos.brands.logo',
];

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

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

export default CompanyPage;
