{Users.can.edit(this.props.currentUser, this.props.post) ? component : ""}
)
}
render() {
({UserAvatar, UserName, Vote, PostStats} = Telescope.components);
const post = this.props.post;
let postClass = "post-item";
if (post.sticky) postClass += " post-sticky";
// console.log(post)
// console.log(post.user)
return (
{post.title}
{this.renderCategories()}
{moment(post.postedAt).fromNow()}
{this.renderActions()}
{this.renderCommenters()}
)
}
};
PostItem.propTypes = {
post: React.PropTypes.object.isRequired, // the current comment
currentUser: React.PropTypes.object, // the current user
}
module.exports = PostItem;