colorList,
commentTreeMaxDepth,
futureDaysToUnixTime,
+ getCommentParentId,
isAdmin,
isBanned,
isMod,
)}
</button>
{this.linkBtn(true)}
+ {cv.comment.language_id != 0 && (
+ <span className="">
+ {
+ this.props.allLanguages.find(
+ lang => lang.id === cv.comment.language_id
+ )?.name
+ }
+ </span>
+ )}
{/* This is an expanding spacer for mobile */}
- <div className="mr-lg-5 flex-grow-1 flex-lg-grow-0 unselectable pointer mx-2"></div>
+ <div className="mr-lg-5 flex-grow-1 flex-lg-grow-0 unselectable pointer mx-2" />
{showScores() && (
<>
<a
? i18n.t("show_context")
: i18n.t("link");
+ // The context button should show the parent comment by default
+ const parentCommentId = getCommentParentId(cv.comment) ?? cv.comment.id;
+
return (
<>
<Link
className={classnames}
- to={`/comment/${cv.comment.id}`}
+ to={`/comment/${parentCommentId}`}
title={title}
>
<Icon icon="link" classes="icon-inline" />