Vulcan/packages/nova-base-components/lib/posts/PostsPage.jsx

41 lines
1 KiB
React
Raw Normal View History

2016-08-08 11:18:21 +09:00
import Telescope from 'meteor/nova:lib';
import React from 'react';
2016-06-23 11:40:35 +09:00
import Posts from "meteor/nova:posts";
2016-10-27 15:29:15 +09:00
const PostsPage = (props) => {
2016-02-18 16:26:52 +09:00
const post = props.document;
2016-02-23 11:34:40 +09:00
const htmlBody = {__html: post.htmlBody};
2016-02-18 16:26:52 +09:00
return (
<div className="posts-page">
2016-02-18 16:26:52 +09:00
<Telescope.components.HeadTags url={Posts.getLink(post)} title={post.title} image={post.thumbnailUrl} />
<Telescope.components.PostsItem post={post} />
2016-03-22 10:38:57 +09:00
2016-08-07 19:10:53 +09:00
{post.htmlBody ? <div className="posts-page-body" dangerouslySetInnerHTML={htmlBody}></div> : null}
2016-03-22 10:38:57 +09:00
{/*<SocialShare url={ Posts.getLink(post) } title={ post.title }/>*/}
2016-02-18 16:26:52 +09:00
2016-11-07 23:46:12 +09:00
<Telescope.components.CommentsListContainer
component={Telescope.components.PostsCommentsThread}
postId={post._id}
componentProps={{
commentCount: post.commentCount,
2016-11-07 23:46:12 +09:00
postId: post._id
}}
/>
2016-02-18 16:26:52 +09:00
</div>
)
};
PostsPage.displayName = "PostsPage";
PostsPage.propTypes = {
document: React.PropTypes.object
}
module.exports = PostsPage;
export default PostsPage;