summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
0bd9a17)
* Show parent comment for comment link. Fixes #1030
* Changing let to const.
colorList,
commentTreeMaxDepth,
futureDaysToUnixTime,
colorList,
commentTreeMaxDepth,
futureDaysToUnixTime,
isAdmin,
isBanned,
isMod,
isAdmin,
isBanned,
isMod,
? i18n.t("show_context")
: i18n.t("link");
? 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}
return (
<>
<Link
className={classnames}
- to={`/comment/${cv.comment.id}`}
+ to={`/comment/${parentCommentId}`}
title={title}
>
<Icon icon="link" classes="icon-inline" />
title={title}
>
<Icon icon="link" classes="icon-inline" />