Fix content list import

This commit is contained in:
Daniel Kluge 2022-10-08 13:37:28 +02:00
parent d6d34b1fc2
commit 4e9f7f4621

View File

@ -1,8 +1,7 @@
import type { NextPage } from "next"; import type { NextPage } from "next";
import type { ContentList } from "../lib/content/types"; import type { ContentList } from "../lib/content/types";
import ProjectCard from "../components/Blog/Card"; import ProjectCard from "../components/Blog/Card";
import { getContentList } from "../lib/content/generateBackend";
import contentList from "../public/content/list.json";
import styles from "../styles/Blog/Front.module.scss"; import styles from "../styles/Blog/Front.module.scss";
import Layout from "../components/Blog/Layout"; import Layout from "../components/Blog/Layout";
@ -26,7 +25,7 @@ const Blog: NextPage<{ content: ContentList }> = ({content}) => {
}; };
export async function getServerSideProps() { export async function getServerSideProps() {
return { props: { content: contentList } }; return { props: { content: await getContentList() } };
} }
export default Blog; export default Blog;