diff options
author | Dessalines <tyhou13@gmx.com> | 2020-07-08 01:02:14 -0400 |
---|---|---|
committer | Dessalines <tyhou13@gmx.com> | 2020-07-08 01:02:14 -0400 |
commit | cd4e0ab3c2cfd615e4771fb9181a31ce237b5ceb (patch) | |
tree | 699dd63cd3ad7601e49a1173884506e3638ae37a /ui/src/components/post-listing.tsx | |
parent | 8fda7d00d5ec9e415b44aa10cff3c4d735563a20 (diff) |
HTML title bugs.
- Fixing HTML titles for some pages. Fixes #801
- Removing WebSocketService.Instance.site, fetching site on demand now.
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 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' |