From 36c1c1f26230fc149faacebb8ee12deffaa347a7 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Fri, 18 Nov 2022 23:39:32 -0500 Subject: [PATCH] Fix wrong comment link. Fixes #714 (#865) --- 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 d513b10..4a1966c 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) && (