diff options
Diffstat (limited to 'ui/src/components/post-listings.tsx')
-rw-r--r-- | ui/src/components/post-listings.tsx | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/ui/src/components/post-listings.tsx b/ui/src/components/post-listings.tsx index 833c8e61..b65c9192 100644 --- a/ui/src/components/post-listings.tsx +++ b/ui/src/components/post-listings.tsx @@ -10,7 +10,6 @@ interface PostListingsProps { } export class PostListings extends Component<PostListingsProps, any> { - constructor(props: any, context: any) { super(props, context); } @@ -18,19 +17,32 @@ export class PostListings extends Component<PostListingsProps, any> { render() { return ( <div> - {this.props.posts.length > 0 ? this.props.posts.map(post => - <> - <PostListing post={post} showCommunity={this.props.showCommunity} /> - <hr class="d-md-none my-2" /> - <div class="d-none d-md-block my-2"></div> - </> - ) : + {this.props.posts.length > 0 ? ( + this.props.posts.map(post => ( + <> + <PostListing + post={post} + showCommunity={this.props.showCommunity} + /> + <hr class="d-md-none my-2" /> + <div class="d-none d-md-block my-2"></div> + </> + )) + ) : ( <> - <div><T i18nKey="no_posts">#</T></div> - {this.props.showCommunity !== undefined && <div><T i18nKey="subscribe_to_communities">#<Link to="/communities">#</Link></T></div>} + <div> + <T i18nKey="no_posts">#</T> + </div> + {this.props.showCommunity !== undefined && ( + <div> + <T i18nKey="subscribe_to_communities"> + #<Link to="/communities">#</Link> + </T> + </div> + )} </> - } + )} </div> - ) + ); } } |