diff options
author | Dessalines <tyhou13@gmx.com> | 2019-10-18 17:20:27 -0700 |
---|---|---|
committer | Dessalines <tyhou13@gmx.com> | 2019-10-18 17:20:27 -0700 |
commit | 4e5561283392d2ab1545cabb4455a8ffc490f86b (patch) | |
tree | a4ee9cc096826dc32faf3675212c7f95f1b3ea5e /ui/src/components/post-listings.tsx | |
parent | 82ea5ae9186e5a8e631c87a61077e16713eb87a4 (diff) |
Running prettier on code.
- #305 , #309
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> - ) + ); } } |