mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-11 03:24:16 +00:00
32 lines
839 B
JavaScript
Executable File
32 lines
839 B
JavaScript
Executable File
import React from "react"
|
|
import { Result } from "antd"
|
|
|
|
import PostModel from "models/post"
|
|
|
|
import { PostsList } from "components"
|
|
import { Icons } from "components/Icons"
|
|
|
|
const emptyListRender = () => {
|
|
return <Result
|
|
icon={<Icons.UserX style={{ fontSize: "50px" }} />}
|
|
>
|
|
<h2>
|
|
It's seems this user has no public post, yet.
|
|
</h2>
|
|
</Result>
|
|
}
|
|
|
|
export default class UserPosts extends React.Component {
|
|
render() {
|
|
return <div className="userPosts">
|
|
<PostsList
|
|
emptyListRender={emptyListRender}
|
|
onLoadMore={PostModel.getUserPosts}
|
|
loadFromModel={PostModel.getUserPosts}
|
|
loadFromModelProps={{
|
|
user_id: this.props.state.user._id,
|
|
}}
|
|
/>
|
|
</div>
|
|
}
|
|
} |