mirror of
https://github.com/vale981/Vulcan
synced 2025-03-10 12:36:39 -04:00
41 lines
1.1 KiB
JavaScript
41 lines
1.1 KiB
JavaScript
import Telescope from 'meteor/nova:lib';
|
|
import React from 'react';
|
|
import Posts from 'meteor/nova:posts';
|
|
import { withPostsSingle } from 'meteor/nova:base-containers';
|
|
|
|
const PostsPage = (props) => {
|
|
|
|
if (props.data.loading) {
|
|
|
|
return <div className="posts-page"><Telescope.components.Loading/></div>
|
|
|
|
} else {
|
|
|
|
const post = props.data.post;
|
|
const htmlBody = {__html: post.htmlBody};
|
|
|
|
return (
|
|
<div className="posts-page">
|
|
<Telescope.components.HeadTags url={Posts.getLink(post)} title={post.title} image={post.thumbnailUrl} />
|
|
|
|
<Telescope.components.PostsItem post={post} />
|
|
|
|
{post.htmlBody ? <div className="posts-page-body" dangerouslySetInnerHTML={htmlBody}></div> : null}
|
|
|
|
{/*<SocialShare url={ Posts.getLink(post) } title={ post.title }/>*/}
|
|
|
|
<Telescope.components.PostsCommentsThread postId={post._id} />
|
|
|
|
</div>
|
|
)
|
|
}
|
|
};
|
|
|
|
PostsPage.displayName = "PostsPage";
|
|
|
|
PostsPage.propTypes = {
|
|
document: React.PropTypes.object
|
|
}
|
|
|
|
module.exports = withPostsSingle(PostsPage);
|
|
export default withPostsSingle(PostsPage);
|