mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-26 14:21:13 +00:00
Merge branch 'main' into nicer-error-hnadling
This commit is contained in:
commit
044cc88d7a
1 changed files with 5 additions and 1 deletions
|
@ -42,6 +42,7 @@ import {
|
||||||
colorList,
|
colorList,
|
||||||
commentTreeMaxDepth,
|
commentTreeMaxDepth,
|
||||||
futureDaysToUnixTime,
|
futureDaysToUnixTime,
|
||||||
|
getCommentParentId,
|
||||||
isAdmin,
|
isAdmin,
|
||||||
isBanned,
|
isBanned,
|
||||||
isMod,
|
isMod,
|
||||||
|
@ -1051,11 +1052,14 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
|
||||||
? i18n.t("show_context")
|
? i18n.t("show_context")
|
||||||
: i18n.t("link");
|
: i18n.t("link");
|
||||||
|
|
||||||
|
// The context button should show the parent comment by default
|
||||||
|
const parentCommentId = getCommentParentId(cv.comment) ?? cv.comment.id;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Link
|
<Link
|
||||||
className={classnames}
|
className={classnames}
|
||||||
to={`/comment/${cv.comment.id}`}
|
to={`/comment/${parentCommentId}`}
|
||||||
title={title}
|
title={title}
|
||||||
>
|
>
|
||||||
<Icon icon="link" classes="icon-inline" />
|
<Icon icon="link" classes="icon-inline" />
|
||||||
|
|
Loading…
Reference in a new issue