From 87209ab169eae93de6bba5e89189c6a68cc4d93f Mon Sep 17 00:00:00 2001 From: ayeshoali Date: Tue, 1 Nov 2022 14:51:47 +0500 Subject: [PATCH] style: truncation added for long topic namesd --- src/discussions/posts/post/PostHeader.jsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/discussions/posts/post/PostHeader.jsx b/src/discussions/posts/post/PostHeader.jsx index b00a9266..cedcc051 100644 --- a/src/discussions/posts/post/PostHeader.jsx +++ b/src/discussions/posts/post/PostHeader.jsx @@ -95,7 +95,6 @@ function PostHeader({ const showAnsweredBadge = preview && post.hasEndorsed && post.type === ThreadType.QUESTION; const authorLabelColor = AvatarOutlineAndLabelColors[post.authorLabel]; const hasAnyAlert = useAlertBannerVisible(post); - const topic = useSelector(selectTopic(post.topicId)); const topicContext = useSelector(selectTopicContext(post.topicId)); const getTopicSubsection = useSelector(selectorForUnitSubsection); @@ -130,14 +129,17 @@ function PostHeader({ linkToProfile /> {topicContext && topic && ( -
- {intl.formatMessage(messages.relatedTo)}{' '} +
+ {`${intl.formatMessage(messages.relatedTo)} `} - {`${getTopicCategoryName(topic)} / ${topic.name}`} - +
+ {getTopicCategoryName(topic)} + / + {topic.name} +
)}