From: m52go <mfiver@gmail.com> Date: Tue, 17 Nov 2020 19:15:55 +0000 (+0000) Subject: Hide downvote on mobile when downvotes disabled X-Git-Url: http://these/git/%24%7B%60data:application/static/gitweb.css?a=commitdiff_plain;h=f53c796a708f180dd5651f8ef4e41ecb6f138b89;p=lemmy-ui.git Hide downvote on mobile when downvotes disabled To address #79. --- diff --git a/src/shared/components/post-listing.tsx b/src/shared/components/post-listing.tsx index 809b8d1..6e5e867 100644 --- a/src/shared/components/post-listing.tsx +++ b/src/shared/components/post-listing.tsx @@ -562,7 +562,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> { </svg> {this.state.upvotes} </button> - <button + {this.props.enableDownvotes && (<button className={`ml-2 btn-animate btn py-0 pl-1 ${ this.state.my_vote == -1 ? 'text-danger' : 'text-muted' }`} @@ -576,6 +576,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> { <span>{this.state.downvotes}</span> )} </button> + )} </div> <button class="btn btn-link btn-animate text-muted py-0 pl-1 pr-0"