mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-29 15:51:14 +00:00
Fix wrong comment link. Fixes #714
This commit is contained in:
parent
765ed9549a
commit
4d798a42b8
1 changed files with 27 additions and 19 deletions
|
@ -448,31 +448,39 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get postLink() {
|
||||||
|
let post = this.props.post_view.post;
|
||||||
|
return (
|
||||||
|
<Link
|
||||||
|
className={!post.stickied ? "text-body" : "text-primary"}
|
||||||
|
to={`/post/${post.id}`}
|
||||||
|
title={i18n.t("comments")}
|
||||||
|
>
|
||||||
|
<div dangerouslySetInnerHTML={mdToHtmlInline(post.name)} />
|
||||||
|
</Link>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
postTitleLine() {
|
postTitleLine() {
|
||||||
let post = this.props.post_view.post;
|
let post = this.props.post_view.post;
|
||||||
return (
|
return (
|
||||||
<div className="post-title overflow-hidden">
|
<div className="post-title overflow-hidden">
|
||||||
<h5>
|
<h5>
|
||||||
{post.url.match({
|
{post.url.match({
|
||||||
some: url => (
|
some: url =>
|
||||||
<a
|
this.props.showBody ? (
|
||||||
className={!post.stickied ? "text-body" : "text-primary"}
|
<a
|
||||||
href={url}
|
className={!post.stickied ? "text-body" : "text-primary"}
|
||||||
title={url}
|
href={url}
|
||||||
rel={relTags}
|
title={url}
|
||||||
>
|
rel={relTags}
|
||||||
<div dangerouslySetInnerHTML={mdToHtmlInline(post.name)} />
|
>
|
||||||
</a>
|
<div dangerouslySetInnerHTML={mdToHtmlInline(post.name)} />
|
||||||
),
|
</a>
|
||||||
none: (
|
) : (
|
||||||
<Link
|
this.postLink
|
||||||
className={!post.stickied ? "text-body" : "text-primary"}
|
),
|
||||||
to={`/post/${post.id}`}
|
none: this.postLink,
|
||||||
title={i18n.t("comments")}
|
|
||||||
>
|
|
||||||
<div dangerouslySetInnerHTML={mdToHtmlInline(post.name)} />
|
|
||||||
</Link>
|
|
||||||
),
|
|
||||||
})}
|
})}
|
||||||
{post.url.map(isImage).or(post.thumbnail_url).unwrapOr(false) && (
|
{post.url.map(isImage).or(post.thumbnail_url).unwrapOr(false) && (
|
||||||
<button
|
<button
|
||||||
|
|
Loading…
Reference in a new issue