From 67563c5c2587f6c75c2a609ae75003f19b84ddd3 Mon Sep 17 00:00:00 2001 From: Hollgy Date: Tue, 12 Mar 2024 18:33:08 +0100 Subject: [PATCH] Refactor of posts --- client-solid/src/Components/Menu.tsx | 1 + client-solid/src/Components/Posts.tsx | 12 ++++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/client-solid/src/Components/Menu.tsx b/client-solid/src/Components/Menu.tsx index 79e04f6..36e4b67 100644 --- a/client-solid/src/Components/Menu.tsx +++ b/client-solid/src/Components/Menu.tsx @@ -28,6 +28,7 @@ export function Menu(): JSXElement { + {/*Filter component for popular */} diff --git a/client-solid/src/Components/Posts.tsx b/client-solid/src/Components/Posts.tsx index 39377d4..d69d934 100644 --- a/client-solid/src/Components/Posts.tsx +++ b/client-solid/src/Components/Posts.tsx @@ -23,24 +23,28 @@ export function Posts(): JSXElement { } // This is the card container for a post -export function PostSegment(props: { post: Post }): JSXElement { +export function PostSegment({ post } : { post: Post }): JSXElement { const nav = useNavigate(); + return (
+

+ {post.createdAt ?? "No Creation Date"} +

- {props.post?.content} + {post.content}