From 9a4fe0fdb3946546170d0d150380b3f21dff0f47 Mon Sep 17 00:00:00 2001 From: tinumide Date: Fri, 3 Sep 2021 22:09:19 +0000 Subject: [PATCH] feat: added author label markers to UI feat: added author label markers to UI feat: added author label to message.postedOn object feat: added author label to reply component fix: changed bracket for author label in reply component fix:fixed lint error --- src/discussions/comments/reply/Reply.jsx | 2 +- src/discussions/posts/post/Post.jsx | 1 + src/discussions/posts/post/messages.js | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/discussions/comments/reply/Reply.jsx b/src/discussions/comments/reply/Reply.jsx index 3cd759de..ddb5ed77 100644 --- a/src/discussions/comments/reply/Reply.jsx +++ b/src/discussions/comments/reply/Reply.jsx @@ -21,7 +21,7 @@ function ReplyHeader({ reply, intl }) {

- {reply.author} + {reply.author} {reply.authorLabel ? `(${reply.authorLabel})` : '' }

diff --git a/src/discussions/posts/post/Post.jsx b/src/discussions/posts/post/Post.jsx index 15f8d668..4ce9a6fc 100644 --- a/src/discussions/posts/post/Post.jsx +++ b/src/discussions/posts/post/Post.jsx @@ -74,6 +74,7 @@ function PostHeader({ { author: post.author, time: timeago.format(post.createdAt, intl.locale), + authorLabel: post.authorLabel ? `(${post.authorLabel})` : '', }, )} diff --git a/src/discussions/posts/post/messages.js b/src/discussions/posts/post/messages.js index fa0bf3cc..0d809d70 100644 --- a/src/discussions/posts/post/messages.js +++ b/src/discussions/posts/post/messages.js @@ -7,7 +7,7 @@ const messages = defineMessages({ }, postedOn: { id: 'discussions.post.posted-on', - defaultMessage: 'Posted {time} by {author}', + defaultMessage: 'Posted {time} by {author} {authorLabel}', }, contentReported: { id: 'discussions.post.content-reported',