From f53c796a708f180dd5651f8ef4e41ecb6f138b89 Mon Sep 17 00:00:00 2001 From: m52go <mfiver@gmail.com> Date: Tue, 17 Nov 2020 19:15:55 +0000 Subject: [PATCH] Hide downvote on mobile when downvotes disabled To address #79. --- src/shared/components/post-listing.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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" -- 2.44.1