diff --git a/daily-thought-frontend/src/components/comments/Comment.tsx b/daily-thought-frontend/src/components/comments/Comment.tsx index 754572915a6f59bac3e4cb2d8a3f8b5f31a486a1..7d83228aca16507bdc7a5949255dcf94b91fee3a 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 c184ae7f7bf0e23b67d4a97d92bea5eaa0a6fd4f..8a18c81f8f33cb5d6295e18d99d5d234139a090b 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 02f29df7c713c80907978432dc3b7c2216e651e5..b7f9d2074af13474def045e721d0145f130aa92a 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 6b94ff10477e5bf00d86e636b0fd06898cb10e39..d22386103c6da872ed718b90c4fc334f1094bc54 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