diff options
author | Filip785 <fdjuricic98@gmail.com> | 2020-07-08 17:21:44 +0200 |
---|---|---|
committer | Filip785 <fdjuricic98@gmail.com> | 2020-07-08 17:21:44 +0200 |
commit | e7b7b0dee30356ef6912168949112896fe4dd65c (patch) | |
tree | 3ab0abc410a4da218c08b45349824585afa8cb6c /ui/src/components/post-listing.tsx | |
parent | 68e9755e593bbd8230eab2a123e822022721f071 (diff) | |
parent | cd5f500d11d131213ccb89d3a8c9f5e31b3c758b (diff) |
Merge remote-tracking branch 'upstream/master' into cake-day
Diffstat (limited to 'ui/src/components/post-listing.tsx')
-rw-r--r-- | ui/src/components/post-listing.tsx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ui/src/components/post-listing.tsx b/ui/src/components/post-listing.tsx index e6b9721c..7199510b 100644 --- a/ui/src/components/post-listing.tsx +++ b/ui/src/components/post-listing.tsx @@ -62,6 +62,8 @@ interface PostListingProps { showBody?: boolean; moderators?: Array<CommunityUser>; admins?: Array<UserView>; + enableDownvotes: boolean; + enableNsfw: boolean; } export class PostListing extends Component<PostListingProps, PostListingState> { @@ -116,6 +118,8 @@ export class PostListing extends Component<PostListingProps, PostListingState> { post={this.props.post} onEdit={this.handleEditPost} onCancel={this.handleEditCancel} + enableNsfw={this.props.enableNsfw} + enableDownvotes={this.props.enableDownvotes} /> </div> )} @@ -276,7 +280,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> { > {this.state.score} </div> - {WebSocketService.Instance.site.enable_downvotes && ( + {this.props.enableDownvotes && ( <button className={`btn-animate btn btn-link p-0 ${ this.state.my_vote == -1 ? 'text-danger' : 'text-muted' |