mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-30 00:01:15 +00:00
feat(post-listing): Add link to post for mobile preview
This commit is contained in:
parent
f2d8c5e07b
commit
e470db3fde
1 changed files with 5 additions and 2 deletions
|
@ -1382,9 +1382,12 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
|
||||||
}
|
}
|
||||||
|
|
||||||
showMobilePreview() {
|
showMobilePreview() {
|
||||||
const body = this.postView.post.body;
|
const { body, id } = this.postView.post;
|
||||||
|
|
||||||
return !this.showBody && body ? (
|
return !this.showBody && body ? (
|
||||||
|
<Link className="text-body" to={`/post/${id}`}>
|
||||||
<div className="md-div mb-1 preview-lines">{body}</div>
|
<div className="md-div mb-1 preview-lines">{body}</div>
|
||||||
|
</Link>
|
||||||
) : (
|
) : (
|
||||||
<></>
|
<></>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue