import { Component } from 'inferno'; import { Link } from 'inferno-router'; import { Post } from '../interfaces'; import { PostListing } from './post-listing'; interface PostListingsProps { posts: Array; showCommunity?: boolean; } export class PostListings extends Component { constructor(props: any, context: any) { super(props, context); } render() { return (
{this.props.posts.length > 0 ? this.props.posts.map(post => ) :
No posts. {this.props.showCommunity !== undefined && Subscribe to some communities.}
}
) } }