mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-01 18:20:00 +00:00
Dessalines
465f5080c0
- Adding divider lines in between post listings. - Increasing button sizes. - Fixes #222
35 lines
946 B
TypeScript
Vendored
35 lines
946 B
TypeScript
Vendored
import { Component } from 'inferno';
|
|
import { Link } from 'inferno-router';
|
|
import { Post } from '../interfaces';
|
|
import { PostListing } from './post-listing';
|
|
import { T } from 'inferno-i18next';
|
|
|
|
interface PostListingsProps {
|
|
posts: Array<Post>;
|
|
showCommunity?: boolean;
|
|
}
|
|
|
|
export class PostListings extends Component<PostListingsProps, any> {
|
|
|
|
constructor(props: any, context: any) {
|
|
super(props, context);
|
|
}
|
|
|
|
render() {
|
|
return (
|
|
<div>
|
|
{this.props.posts.length > 0 ? this.props.posts.map(post =>
|
|
<>
|
|
<PostListing post={post} showCommunity={this.props.showCommunity} />
|
|
<hr class="my-2" />
|
|
</>
|
|
) :
|
|
<>
|
|
<div><T i18nKey="no_posts">#</T></div>
|
|
{this.props.showCommunity !== undefined && <div><T i18nKey="subscribe_to_communities">#<Link to="/communities">#</Link></T></div>}
|
|
</>
|
|
}
|
|
</div>
|
|
)
|
|
}
|
|
}
|