1 import { Component } from 'inferno';
2 import { Link } from 'inferno-router';
3 import { Post } from '../interfaces';
4 import { PostListing } from './post-listing';
5 import { i18n } from '../i18next';
6 import { T } from 'inferno-i18next';
8 interface PostListingsProps {
10 showCommunity?: boolean;
13 export class PostListings extends Component<PostListingsProps, any> {
14 constructor(props: any, context: any) {
15 super(props, context);
21 {this.props.posts.length > 0 ? (
22 this.props.posts.map(post => (
26 showCommunity={this.props.showCommunity}
28 <hr class="d-md-none my-2" />
29 <div class="d-none d-md-block my-2"></div>
35 { i18n.t('no_posts') }
37 {this.props.showCommunity !== undefined && (
39 <Link to="/communities">{ i18n.t('subscribe_to_communities') }</Link>