import { Component } from 'inferno';
import { Link } from 'inferno-router';
-import { Post, SortType } from '../interfaces';
+import { Post, SortType } from 'lemmy-js-client';
import { postSort } from '../utils';
import { PostListing } from './post-listing';
import { i18n } from '../i18next';
showCommunity?: boolean;
removeDuplicates?: boolean;
sort?: SortType;
+ enableDownvotes: boolean;
+ enableNsfw: boolean;
}
export class PostListings extends Component<PostListingsProps, any> {
<PostListing
post={post}
showCommunity={this.props.showCommunity}
+ enableDownvotes={this.props.enableDownvotes}
+ enableNsfw={this.props.enableNsfw}
/>
- <hr class="d-md-none my-2" />
- <div class="d-none d-md-block my-2"></div>
+ <hr class="my-3" />
</>
))
) : (
}
if (this.props.sort !== undefined) {
- postSort(out, this.props.sort);
+ postSort(out, this.props.sort, this.props.showCommunity == undefined);
}
return out;