From 2fc5c21f72956da71a95393c59918152aad8f669 Mon Sep 17 00:00:00 2001 From: vladislavkeblysh Date: Wed, 11 Oct 2023 20:49:43 +0300 Subject: [PATCH] feat: add profile image to comment header --- src/discussions/post-comments/comments/comment/Comment.jsx | 3 ++- .../post-comments/comments/comment/CommentHeader.jsx | 5 +++++ src/discussions/posts/post/PostHeader.jsx | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/discussions/post-comments/comments/comment/Comment.jsx b/src/discussions/post-comments/comments/comment/Comment.jsx index 290bb95ab..330582fbe 100644 --- a/src/discussions/post-comments/comments/comment/Comment.jsx +++ b/src/discussions/post-comments/comments/comment/Comment.jsx @@ -43,7 +43,7 @@ const Comment = ({ const { id, parentId, childCount, abuseFlagged, endorsed, threadId, endorsedAt, endorsedBy, endorsedByLabel, renderedBody, voted, following, voteCount, authorLabel, author, createdAt, lastEdit, rawBody, closed, closedBy, closeReason, - editByLabel, closedByLabel, + editByLabel, closedByLabel, users: postUsers, } = comment; const intl = useIntl(); const hasChildren = childCount > 0; @@ -203,6 +203,7 @@ const Comment = ({ closed={closed} createdAt={createdAt} lastEdit={lastEdit} + postUsers={postUsers} /> {isEditing ? ( { const colorClass = AvatarOutlineAndLabelColors[authorLabel]; const hasAnyAlert = useAlertBannerVisible({ @@ -24,6 +25,8 @@ const CommentHeader = ({ closed, }); + const profileImage = postUsers && Object.values(postUsers)[0].profile.image; + return (