From e2b88528998580a3254262b9af7704e0fce62841 Mon Sep 17 00:00:00 2001
From: Matt Kirby <MattJKirby@outlook.com>
Date: Sat, 11 Mar 2023 21:40:20 +0000
Subject: [PATCH] Added simple post component

---
 .../src/components/post/Post.tsx              | 60 +++++++++++++++++++
 1 file changed, 60 insertions(+)
 create mode 100644 daily-thought-frontend/src/components/post/Post.tsx

diff --git a/daily-thought-frontend/src/components/post/Post.tsx b/daily-thought-frontend/src/components/post/Post.tsx
new file mode 100644
index 00000000..d501b3bb
--- /dev/null
+++ b/daily-thought-frontend/src/components/post/Post.tsx
@@ -0,0 +1,60 @@
+import { User } from "@/types/user";
+import { FC, PropsWithChildren } from "react";
+import styles from '../../styles/Post.module.css'
+import PostAction from "./PostAction";
+import { generateRandomLinearGradient } from "./Utils";
+
+type PostProps = {
+  User: User,
+  Post: string,
+  TimeStamp?: string,
+  Likes: User[],
+}
+
+
+const Post: FC<PropsWithChildren<PostProps>> = ({
+  User,
+  Post,
+  TimeStamp,
+  Likes
+}) => {
+
+  return (
+    <div className={styles.post}>
+      <div className={styles.header}>
+        <div className={styles.avatar} style={{backgroundImage: generateRandomLinearGradient(User.Colors, true)}}>
+          {User.Avatar && 
+            <div>
+
+            </div>
+          }
+          {!User.Avatar && 
+            <div>
+              <p>{User.Username[0]}</p>
+            </div>
+          }
+        </div>
+        <div className={styles.headerInfo}>
+          <div className={styles.headerUserInfo}>
+            <p className={styles.name} >{User.FirstName} {User.LastName}</p>
+            <p className={styles.username}>@{User.Username}</p>
+          </div>
+          <div className={styles.timestamp}>
+            {TimeStamp}
+          </div>
+        </div>
+      </div>
+      <div className={styles.postContentContainer}>
+        <p className={styles.postContent}>{Post}</p>
+
+        <div className={styles.postActions}>
+          <PostAction />
+          <PostAction />
+          <PostAction />
+        </div>
+      </div>
+    </div>
+  )
+}
+
+export default Post;
\ No newline at end of file
-- 
GitLab