feat(post-listing): Add link to post for mobile preview

This commit is contained in:
Marcin Mróz 2023-06-15 19:21:42 +02:00
parent f2d8c5e07b
commit e470db3fde

View file

@ -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 ? (
<div className="md-div mb-1 preview-lines">{body}</div> <Link className="text-body" to={`/post/${id}`}>
<div className="md-div mb-1 preview-lines">{body}</div>
</Link>
) : ( ) : (
<></> <></>
); );