diff --git a/src/discussions/common/AuthorLabel.jsx b/src/discussions/common/AuthorLabel.jsx index d97120d77..5e424680e 100644 --- a/src/discussions/common/AuthorLabel.jsx +++ b/src/discussions/common/AuthorLabel.jsx @@ -101,17 +101,22 @@ const AuthorLabel = ({ ), [author, authorLabelMessage, authorToolTip, icon, isRetiredUser, postCreatedAt, showTextPrimary, alert]); - const learnerPostsLink = ( - - {!alert && authorName} - - ); + const learnerPostsLink = useMemo(() => { + if (!showUserNameAsLink) { + return null; + } + return ( + + {!alert && authorName} + + ); + }, [showUserNameAsLink, author, courseId, alert, authorName]); return showUserNameAsLink ? (