+
{this.state.fetchedPage.title}
+
+ Published on {this.state.fetchedPage.date} by
+ developomp
+
+
+ {
+ this.state.fetchedPage.toc && (
+ <>
+
+
+ >
+ ) // add toc if it exists
+ }
+
+
+ >
+ )
+ }
}
}
diff --git a/source/src/pages/PostList.tsx b/source/src/pages/PostList.tsx
index 7423305..01c0dfe 100644
--- a/source/src/pages/PostList.tsx
+++ b/source/src/pages/PostList.tsx
@@ -5,7 +5,7 @@ import marked from "marked"
import { Helmet } from "react-helmet-async"
import theming from "../theming"
-import pages from "../pages.json"
+import posts from "../data/posts.json"
const StyledPostList = styled.div`
padding-top: 2rem;
@@ -50,62 +50,77 @@ const StyledPostCard = styled.div`
padding: 10px 20px;
`
-interface HomeProps {
+interface PostListProps {
title: string
howMany?: number
}
-export default class PostList extends React.Component