From b2d9688c89ff4c0a0490ba2b4d90cf1eb5e54145 Mon Sep 17 00:00:00 2001 From: David Jay Date: Mon, 23 Jan 2017 13:25:24 -0500 Subject: [PATCH] Adding postAction mutation and fixing lint errors. --- client/coral-embed-stream/src/Comment.js | 8 ++++---- client/coral-embed-stream/src/Embed.js | 4 ++-- client/coral-embed-stream/src/graphql/mutations/index.js | 3 +-- .../src/graphql/mutations/postAction.graphql | 5 +++++ client/coral-plugin-commentbox/CommentBox.js | 1 - 5 files changed, 12 insertions(+), 9 deletions(-) create mode 100644 client/coral-embed-stream/src/graphql/mutations/postAction.graphql diff --git a/client/coral-embed-stream/src/Comment.js b/client/coral-embed-stream/src/Comment.js index 4ed0296a2..c5158e31a 100644 --- a/client/coral-embed-stream/src/Comment.js +++ b/client/coral-embed-stream/src/Comment.js @@ -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 ( diff --git a/client/coral-embed-stream/src/Embed.js b/client/coral-embed-stream/src/Embed.js index ee2d1f16e..5a44f8532 100644 --- a/client/coral-embed-stream/src/Embed.js +++ b/client/coral-embed-stream/src/Embed.js @@ -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; diff --git a/client/coral-embed-stream/src/graphql/mutations/index.js b/client/coral-embed-stream/src/graphql/mutations/index.js index f637a325a..419891c06 100644 --- a/client/coral-embed-stream/src/graphql/mutations/index.js +++ b/client/coral-embed-stream/src/graphql/mutations/index.js @@ -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, { }); }}), }); - diff --git a/client/coral-embed-stream/src/graphql/mutations/postAction.graphql b/client/coral-embed-stream/src/graphql/mutations/postAction.graphql new file mode 100644 index 000000000..52a0e1735 --- /dev/null +++ b/client/coral-embed-stream/src/graphql/mutations/postAction.graphql @@ -0,0 +1,5 @@ +mutation CreateAction ($action: ActionInput) { + createAction(action:$action) { + ...action + } +} diff --git a/client/coral-plugin-commentbox/CommentBox.js b/client/coral-plugin-commentbox/CommentBox.js index ebafab918..ff9bf7e39 100644 --- a/client/coral-plugin-commentbox/CommentBox.js +++ b/client/coral-plugin-commentbox/CommentBox.js @@ -31,7 +31,6 @@ class CommentBox extends Component { child_id, addNotification, appendItemArray, - premod, author } = this.props;