From 5c740cdff0a9eb00e3dc438cd11b35e16e5978a7 Mon Sep 17 00:00:00 2001 From: Dessalines <tyhou13@gmx.com> Date: Fri, 25 Sep 2020 17:47:38 -0500 Subject: [PATCH] Fixing post listing issue. --- src/shared/components/post-listing.tsx | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/shared/components/post-listing.tsx b/src/shared/components/post-listing.tsx index cac0fd7..0f56d22 100644 --- a/src/shared/components/post-listing.tsx +++ b/src/shared/components/post-listing.tsx @@ -490,7 +490,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> { ); } - commentsLine(showVotes: boolean = false) { + commentsLine(mobile: boolean = false) { let post = this.props.post; return ( <div class="d-flex justify-content-between justify-content-lg-start flex-wrap text-muted font-weight-bold"> @@ -510,9 +510,22 @@ export class PostListing extends Component<PostListingProps, PostListingState> { })} </Link> </button> + {!mobile && this.state.downvotes !== 0 && ( + <button + class="btn text-muted py-0" + data-tippy-content={this.pointsTippy} + > + <small> + <svg class="icon icon-inline mr-1"> + <use xlinkHref="#icon-arrow-down1"></use> + </svg> + <span>{this.state.downvotes}</span> + </small> + </button> + )} {/* This is an expanding spacer for mobile */} <div className="flex-grow-1"></div> - {(showVotes || this.state.upvotes !== this.state.score) && ( + {mobile && ( <> <div> <button -- 2.44.1