{Users.can.edit(this.props.currentUser, this.props.post) ? component : ""}
)
}
render() {
({UserAvatar, Vote, PostStats} = Telescope.components);
const post = this.props.post;
return (
{Users.getDisplayName(post.user)}, {moment(post.postedAt).fromNow()}, {post.commentCount} comments
{this.renderCategories()}
{this.renderCommenters()}
{this.renderActions()}
)
}
};
PostItem.propTypes = {
post: React.PropTypes.object.isRequired, // the current comment
currentUser: React.PropTypes.object, // the current user
}
module.exports = PostItem;