import { GetStaticProps, GetStaticPropsContext } from 'next'; import { NAVIGATION, METADATA, CMS } from '../constants'; import { SideMenuItem } from '../state/navigation'; import { CmsApi } from '../services/cms'; import { IFAQItem } from '../types/cms'; import { Accordion } from '../components/Accordion'; import { Contained } from '../components/Contained'; import CustomHead from '../components/CustomHead'; export const getStaticProps: GetStaticProps = async ( context: GetStaticPropsContext, ) => { const cms = new CmsApi(); const { entries: faqItems, total } = await cms.fetchFAQItems(); return { props: { faqItems, total, }, revalidate: CMS.CONTENT_REVALIDATE_RATE, }; }; interface Props { faqItems: IFAQItem[]; total: number; } function FAQ(props: Props) { const { faqItems } = props; return ( <>

FAQ

{faqItems.map(faqItem => (
))}
); } export default FAQ;