import type { ReactElement } from 'react'; import type { InferGetStaticPropsType } from 'next'; import dynamic from 'next/dynamic'; import Head from 'next/head'; import { getPagingData } from 'lib/posts'; import HomeLayout from 'layouts/HomeLayout'; const Paging = dynamic(() => import('components/Paging')); const PostCard = dynamic(() => import('components/PostCard')); export const getStaticProps = () => { return { props: { ...getPagingData(), }, }; }; const Home = ({ allPages, postDatas, }: InferGetStaticPropsType) => { return ( <> RUA - Home {postDatas.map((post) => ( ))} ); }; Home.getLayout = function getLayout(page: ReactElement) { return {page}; }; export default Home;