mirror of
https://github.com/vale981/Vulcan
synced 2025-03-11 21:16:40 -04:00
32 lines
494 B
React
32 lines
494 B
React
![]() |
// import React from 'react';
|
||
|
|
||
|
const Post = Telescope.getComponent("Post");
|
||
|
|
||
|
PostContainer = React.createClass({
|
||
|
|
||
|
// propTypes: {
|
||
|
|
||
|
// },
|
||
|
|
||
|
mixins: [ReactMeteorData],
|
||
|
|
||
|
getMeteorData() {
|
||
|
|
||
|
const subscription = Meteor.subscribe('singlePost', this.props._id);
|
||
|
|
||
|
return {
|
||
|
post: Posts.findOne(this.props._id)
|
||
|
};
|
||
|
},
|
||
|
|
||
|
render() {
|
||
|
if (this.data.post) {
|
||
|
return (
|
||
|
<Post {...this.data.post} />
|
||
|
)
|
||
|
} else {
|
||
|
return <p>Loading…</p>
|
||
|
}
|
||
|
}
|
||
|
|
||
|
});
|