From 5cf3b5e63488d52488d0360ab1f2e666809fe78f Mon Sep 17 00:00:00 2001
From: Matt Kirby <MattJKirby@outlook.com>
Date: Thu, 13 Apr 2023 23:19:16 +0100
Subject: [PATCH] Modified type

---
 .../src/components/comments/Comment.tsx                   | 4 ++--
 daily-thought-frontend/src/components/post/AnswerCard.tsx | 2 +-
 daily-thought-frontend/src/components/post/Post.tsx       | 6 +++---
 daily-thought-frontend/src/types/user.ts                  | 8 +++++---
 4 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/daily-thought-frontend/src/components/comments/Comment.tsx b/daily-thought-frontend/src/components/comments/Comment.tsx
index 75457291..7d83228a 100644
--- a/daily-thought-frontend/src/components/comments/Comment.tsx
+++ b/daily-thought-frontend/src/components/comments/Comment.tsx
@@ -15,10 +15,10 @@ const Comment: FC<PropsWithChildren<CommentProps>> = ({
     <div className="w-full flex items-center justify-between p-2">
       <div className="flex flex-1">
         <div className="flex h-8 w-8 max-w-xs items-center justify-center rounded-full bg-c-pink text-sm focus:outline-none focus:ring-2 focus:ring-white focus:ring-offset-2 focus:ring-offset-pink-400 mr-2">
-          <img className="h-8 w-8 rounded-full" src={Comment.User.Avatar} alt="" />
+          <img className="h-8 w-8 rounded-full" src={Comment.User.profile} alt="" />
         </div>
         <div>
-          <p className="text-xs font-bold">{Comment.User.Name}</p>
+          <p className="text-xs font-bold">{Comment.User.name}</p>
           <p className="text-sm">This is my comment</p>
           <p className="text-xs text-gray-500">1 like</p>
         </div>
diff --git a/daily-thought-frontend/src/components/post/AnswerCard.tsx b/daily-thought-frontend/src/components/post/AnswerCard.tsx
index c184ae7f..8a18c81f 100644
--- a/daily-thought-frontend/src/components/post/AnswerCard.tsx
+++ b/daily-thought-frontend/src/components/post/AnswerCard.tsx
@@ -18,7 +18,7 @@ const AnswerCard: FC<PropsWithChildren<AnswerCardProps>> = ({
   return (
     <div className="flex-1 rounded-3xl bg-white text-lg shadow-lg overflow-hidden relative">
       <div className="p-4">
-        <p className="text-sm text-gray-600">{`${post.User.Name}'s answer`}</p>
+        <p className="text-sm text-gray-600">{`${post.User.name}'s answer`}</p>
         <div>
           This is my super duper answer. My name is Timmy C and I enjoy smooth jazz.
         </div>
diff --git a/daily-thought-frontend/src/components/post/Post.tsx b/daily-thought-frontend/src/components/post/Post.tsx
index 02f29df7..b7f9d207 100644
--- a/daily-thought-frontend/src/components/post/Post.tsx
+++ b/daily-thought-frontend/src/components/post/Post.tsx
@@ -18,11 +18,11 @@ const Post:FC<PropsWithChildren<PostProps>> = ({
 
       <div className="flex m-2 items-center">
         <div className="flex h-12 w-12 max-w-xs items-center justify-center rounded-full bg-c-pink text-sm focus:outline-none focus:ring-2 focus:ring-white focus:ring-offset-2 focus:ring-offset-pink-400 mr-2">
-          <img className="h-12 w-12 rounded-full" src={post.User.Avatar} alt="" />
+          <img className="h-12 w-12 rounded-full" src={post.User.profile} alt="" />
         </div>
         <div className="flex-1 flex-col">
-          <p className="">{post.User.Name}</p>
-          <p className="text-sm text-gray-500">{`@${post.User.Username}`}</p>
+          <p className="">{post.User.name}</p>
+          <p className="text-sm text-gray-500">{`@${post.User.username}`}</p>
         </div>
         <div className="flex flex-col justify-end">
           <p className="text-xs text-gray-500">Just now</p>
diff --git a/daily-thought-frontend/src/types/user.ts b/daily-thought-frontend/src/types/user.ts
index 6b94ff10..d2238610 100644
--- a/daily-thought-frontend/src/types/user.ts
+++ b/daily-thought-frontend/src/types/user.ts
@@ -1,5 +1,7 @@
 export type User = {
-  Name: string;
-  Username: string;
-  Avatar: string;
+  email: string,
+  profile: string,
+  username: string,
+  id: string,
+  name: string | null
 }
\ No newline at end of file
-- 
GitLab