import type { NextPage } from "next"; import type { ContentList } from "../lib/content/types"; import ProjectCard from "../components/Blog/Card"; import { getContentList } from "../lib/content/generateBackend"; import styles from "../styles/Blog/Front.module.scss"; import Layout from "../components/Blog/Layout"; const Blog: NextPage<{ content: ContentList }> = ({content}) => { const generateCards = (type: string) => { return
{content.filter(p => p.type === type).map(p => )}
; }; return <>

Hello there!

Miaumiau Lorem ipsum

Projects

{ generateCards("project") }

Diaries

{ generateCards("diary") }
; }; export async function getServerSideProps() { return { props: { content: await getContentList() } }; } export default Blog;