Adding postAction mutation and fixing lint errors.

This commit is contained in:
David Jay
2017-01-23 13:25:24 -05:00
parent 6563f29ccf
commit b2d9688c89
5 changed files with 12 additions and 9 deletions
+4 -4
View File
@@ -8,12 +8,12 @@
import React, {PropTypes} from 'react';
import PermalinkButton from 'coral-plugin-permalinks/PermalinkButton';
import AuthorName from '../../coral-plugin-author-name/AuthorName';
// import AuthorName from '../../coral-plugin-author-name/AuthorName';
import Content from '../../coral-plugin-commentcontent/CommentContent';
import PubDate from '../../coral-plugin-pubdate/PubDate';
import {ReplyBox, ReplyButton} from '../../coral-plugin-replies';
import FlagComment from '../../coral-plugin-flags/FlagComment';
import LikeButton from '../../coral-plugin-likes/LikeButton';
// import {ReplyBox, ReplyButton} from '../../coral-plugin-replies';
// import FlagComment from '../../coral-plugin-flags/FlagComment';
// import LikeButton from '../../coral-plugin-likes/LikeButton';
const Comment = ({comment, currentUser, asset, depth}) => {
return (
+2 -2
View File
@@ -1,5 +1,5 @@
import React, {Component, PropTypes} from 'react';
import Pym from 'pym.js';
// import Pym from 'pym.js';
import {compose} from 'react-apollo';
import {connect} from 'react-redux';
@@ -102,7 +102,7 @@ class Embed extends Component {
// const banned = (this.props.userData.status === 'banned');
const {loading, asset, refetch} = this.props.data;
const {loading, asset} = this.props.data;
// const {status, moderation, closedMessage, charCount, charCountEnable} = asset.settings;
@@ -2,7 +2,7 @@ import {graphql} from 'react-apollo';
import POST_COMMENT from './postComment.graphql';
export const postComment = graphql(POST_COMMENT, {
props: ({dispatch, mutate}) => ({
props: ({mutate}) => ({
postItem: ({asset_id, body}) => {
return mutate({
variables: {
@@ -13,4 +13,3 @@ export const postComment = graphql(POST_COMMENT, {
});
}}),
});
@@ -0,0 +1,5 @@
mutation CreateAction ($action: ActionInput) {
createAction(action:$action) {
...action
}
}
@@ -31,7 +31,6 @@ class CommentBox extends Component {
child_id,
addNotification,
appendItemArray,
premod,
author
} = this.props;