From d89d92d3936683f4212186cef517c7930dd5b33a Mon Sep 17 00:00:00 2001 From: Ashelyn Rose Date: Mon, 8 May 2023 19:25:46 -0600 Subject: add markdown rendering, copy in old posts --- app/posts/page.tsx | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'app/posts/page.tsx') diff --git a/app/posts/page.tsx b/app/posts/page.tsx index 34f0e7f..e713259 100644 --- a/app/posts/page.tsx +++ b/app/posts/page.tsx @@ -1,11 +1,26 @@ -export default function Posts() { +import InfoBar from "~/components/InfoBar" +import { Post, getPostSlugs, loadSinglePage } from "~/utils/post" + +export default async function Posts() { + const slugs = await getPostSlugs() + const posts = await Promise.all(slugs.map(loadSinglePage)) + + const sortedPosts = posts.sort((a: Post, b: Post) => b.date.valueOf() - a.date.valueOf()) + return ( <>

Posts

-
-

This will have posts here eventually we promise

+
+ {sortedPosts.map((post: Post) => ( +
+ +

{post.title}

+

{post.subtitle}

+ Read Post => +
+ ))}
) -- cgit 1.4.1