import { Container } from "../components/container" ; import { Section } from "../components/section" ; import { Posts } from "../components/posts" ; import { ExperimentalGetTinaClient } from "../.tina/__generated__/types" ; export default function HomePage ( props ) { const posts = props . data . getPostsList . edges ; return ( < Section className = "flex-1" > < Container size = "large" > < Posts data = { posts } /> < /Container> < /Section>); } export const getStaticProps = async ( ) => { const client = ExperimentalGetTinaClient ( ) ; const tinaProps = await client . PageQuery ( ) ; return { props : { ... tinaProps , } , } ; } ; export type AsyncReturnType < T extends ( ... args : any ) => Promise < any > > = T extends ( ... args : any ) => Promise < infer R > ? R : any ;