From 4d798a42b844be196eff927abe155e70ee314fab Mon Sep 17 00:00:00 2001 From: Dessalines Date: Fri, 18 Nov 2022 22:19:36 -0500 Subject: [PATCH] Fix wrong comment link. Fixes #714 --- src/shared/components/post/post-listing.tsx | 46 ++++++++++++--------- 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/src/shared/components/post/post-listing.tsx b/src/shared/components/post/post-listing.tsx index d513b104..4a1966ca 100644 --- a/src/shared/components/post/post-listing.tsx +++ b/src/shared/components/post/post-listing.tsx @@ -448,31 +448,39 @@ export class PostListing extends Component { ); } + get postLink() { + let post = this.props.post_view.post; + return ( + +
+ + ); + } + postTitleLine() { let post = this.props.post_view.post; return (
{post.url.match({ - some: url => ( - -
- - ), - none: ( - -
- - ), + some: url => + this.props.showBody ? ( + +
+ + ) : ( + this.postLink + ), + none: this.postLink, })} {post.url.map(isImage).or(post.thumbnail_url).unwrapOr(false) && (