2016-08-08 11:18:21 +09:00
|
|
|
import Telescope from 'meteor/nova:lib';
|
2016-03-30 09:24:52 +09:00
|
|
|
import React from 'react';
|
2016-06-23 11:40:35 +09:00
|
|
|
import Posts from "meteor/nova:posts";
|
2016-04-03 11:42:07 +09:00
|
|
|
|
2016-04-14 10:12:35 +09:00
|
|
|
const PostsPage = ({document, currentUser}) => {
|
2016-02-18 16:26:52 +09:00
|
|
|
|
2016-03-17 18:08:03 +09:00
|
|
|
const post = document;
|
2016-02-23 11:34:40 +09:00
|
|
|
const htmlBody = {__html: post.htmlBody};
|
2016-02-18 16:26:52 +09:00
|
|
|
|
2016-02-15 22:33:44 +09:00
|
|
|
return (
|
2016-04-19 15:45:36 +09:00
|
|
|
<div className="posts-page">
|
2016-02-18 16:26:52 +09:00
|
|
|
|
2016-05-22 16:42:24 +09:00
|
|
|
<Telescope.components.HeadTags url={Posts.getLink(post)} title={post.title} image={post.thumbnailUrl} />
|
2016-03-28 10:38:28 +09:00
|
|
|
|
2016-05-22 16:42:24 +09:00
|
|
|
<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
|
|
|
|
2016-03-25 12:17:29 +09:00
|
|
|
{/*<SocialShare url={ Posts.getLink(post) } title={ post.title }/>*/}
|
2016-02-18 16:26:52 +09:00
|
|
|
|
2016-05-22 16:42:24 +09:00
|
|
|
<Telescope.components.PostsCommentsThread document={post} currentUser={currentUser}/>
|
2016-02-18 16:26:52 +09:00
|
|
|
|
2016-02-15 22:33:44 +09:00
|
|
|
</div>
|
|
|
|
)
|
2016-04-02 15:03:55 +02:00
|
|
|
};
|
2016-02-15 22:33:44 +09:00
|
|
|
|
2016-05-22 16:42:24 +09:00
|
|
|
PostsPage.displayName = "PostsPage";
|
|
|
|
|
2016-04-19 15:45:36 +09:00
|
|
|
module.exports = PostsPage;
|
|
|
|
export default PostsPage;
|