import * as React from 'react' import Head from 'next/head' import rivetQuery from '@hashicorp/nextjs-scripts/dato/client' import homepageQuery from './query.graphql' import { renderMetaTags } from 'react-datocms' import IoHomeHero from 'components/io-home-hero' import IoHomeIntro from 'components/io-home-intro' import IoHomeInPractice from 'components/io-home-in-practice' import IoCardContainer from 'components/io-card-container' import IoHomeCaseStudies from 'components/io-home-case-studies' import IoHomeCallToAction from 'components/io-home-call-to-action' import IoHomePreFooter from 'components/io-home-pre-footer' import s from './style.module.css' export default function Homepage({ data }): React.ReactElement { const { seo, heroHeading, heroDescription, heroCtas, heroCards, introHeading, introDescription, introFeatures, introVideo, inPracticeHeading, inPracticeDescription, inPracticeCards, inPracticeCtaHeading, inPracticeCtaDescription, inPracticeCtaLink, inPracticeCtaImage, useCasesHeading, useCasesDescription, useCasesCards, caseStudiesHeading, caseStudiesDescription, caseStudiesFeatured, caseStudiesLinks, callToActionHeading, callToActionDescription, callToActionCtas, preFooterHeading, preFooterDescription, preFooterCtas, } = data const _introVideo = introVideo[0] return ( <> {renderMetaTags(seo)} { return { ...card, cta: card.cta[0], } })} />
{ return { eyebrow: card.eyebrow, link: { url: card.link, type: 'inbound', }, heading: card.heading, description: card.description, products: card.products, } })} />
{ return { eyebrow: card.eyebrow, link: { url: card.link, type: 'inbound', }, heading: card.heading, description: card.description, products: card.products, } })} cta={{ heading: inPracticeCtaHeading, description: inPracticeCtaDescription, link: inPracticeCtaLink, image: inPracticeCtaImage, }} /> ) } export async function getStaticProps() { const { vaultHomepage } = await rivetQuery({ query: homepageQuery, }) return { props: { data: vaultHomepage, }, revalidate: process.env.HASHI_ENV === 'production' ? process.env.GLOBAL_REVALIDATE : 10, } }