diff --git a/pages/index.tsx b/pages/index.tsx index 46d459b..d65b0f5 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -1,8 +1,7 @@ import type { NextPage } from "next"; import type { ContentList } from "../lib/content/types"; import ProjectCard from "../components/Blog/Card"; - -import contentList from "../public/content/list.json"; +import { getContentList } from "../lib/content/generateBackend"; import styles from "../styles/Blog/Front.module.scss"; import Layout from "../components/Blog/Layout"; @@ -26,7 +25,7 @@ const Blog: NextPage<{ content: ContentList }> = ({content}) => { }; export async function getServerSideProps() { - return { props: { content: contentList } }; + return { props: { content: await getContentList() } }; } export default Blog; \ No newline at end of file