mirror of
https://github.com/vale981/Vulcan
synced 2025-03-12 05:26:38 -04:00
24 lines
No EOL
602 B
JavaScript
24 lines
No EOL
602 B
JavaScript
import Telescope from 'meteor/nova:lib';
|
|
import React, { PropTypes, Component } from 'react';
|
|
import Posts from "meteor/nova:posts";
|
|
import { graphql } from 'react-apollo';
|
|
import gql from 'graphql-tag';
|
|
|
|
export default function withPostsSingle (component, options) {
|
|
return graphql(gql`
|
|
query getPost($postId: String) {
|
|
post(_id: $postId) {
|
|
${Posts.graphQLQueries.single}
|
|
}
|
|
}
|
|
`, {
|
|
options(ownProps) {
|
|
return {
|
|
variables: { postId: ownProps.postId },
|
|
// pollInterval: 20000,
|
|
};
|
|
},
|
|
})(component);
|
|
}
|
|
|
|
module.exports = withPostsSingle; |