allow custom emptyListRender

This commit is contained in:
srgooglo 2022-11-14 02:06:40 +00:00
parent 98fdeef3a2
commit 6a0e8ea7d8

View File

@ -141,6 +141,10 @@ export default class PostsExplorer extends React.Component {
render() { render() {
if (this.props.posts.length === 0) { if (this.props.posts.length === 0) {
if (typeof this.props.emptyListRender === "function") {
return React.createElement(this.props.emptyListRender)
}
return <div className="no_more_posts"> return <div className="no_more_posts">
<antd.Empty /> <antd.Empty />
<h1>Whoa, nothing on here...</h1> <h1>Whoa, nothing on here...</h1>