summaryrefslogtreecommitdiffstats
path: root/ui/src/components/post-listing.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'ui/src/components/post-listing.tsx')
-rw-r--r--ui/src/components/post-listing.tsx6
1 files changed, 5 insertions, 1 deletions
diff --git a/ui/src/components/post-listing.tsx b/ui/src/components/post-listing.tsx
index 3d608842..ba100647 100644
--- a/ui/src/components/post-listing.tsx
+++ b/ui/src/components/post-listing.tsx
@@ -61,6 +61,8 @@ interface PostListingProps {
showBody?: boolean;
moderators?: Array<CommunityUser>;
admins?: Array<UserView>;
+ enableDownvotes: boolean;
+ enableNsfw: boolean;
}
export class PostListing extends Component<PostListingProps, PostListingState> {
@@ -115,6 +117,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>
)}
@@ -273,7 +277,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'