From 4e9f7f462199d979d4860b8d72316d03adc7adda Mon Sep 17 00:00:00 2001 From: Daniel Kluge Date: Sat, 8 Oct 2022 13:37:28 +0200 Subject: [PATCH] Fix content list import --- pages/index.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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