import {GetStaticProps, NextPage} from 'next'; import {getReadmeText} from '../src/data'; import ReactMarkdown from 'react-markdown'; import {Wrapper} from '../components/Wrapper'; interface IndexPageProps { readmeType: 'markdown'; readmeText: string; } const IndexPage: NextPage = ({ readmeType, readmeText, }) => { return ( {readmeType === 'markdown' && ( {readmeText} )} ); }; export const getStaticProps: GetStaticProps = async () => { const readmeText = await getReadmeText(); return { props: { readmeType: 'markdown', readmeText, }, }; }; export default IndexPage;