From fa4c6e8ec50911a532f26d33cae19152a4132aa3 Mon Sep 17 00:00:00 2001 From: Riley Davis Date: Mon, 23 Jan 2017 16:56:44 -0700 Subject: [PATCH] lint! --- client/coral-embed-stream/src/Comment.js | 1 + client/coral-embed-stream/src/Embed.js | 1 + .../src/graphql/mutations/index.js | 2 +- client/coral-plugin-commentbox/CommentBox.js | 15 ++++++++++----- client/coral-plugin-replies/ReplyButton.js | 6 ++---- 5 files changed, 15 insertions(+), 10 deletions(-) diff --git a/client/coral-embed-stream/src/Comment.js b/client/coral-embed-stream/src/Comment.js index 21e98ae64..bbc8b6e00 100644 --- a/client/coral-embed-stream/src/Comment.js +++ b/client/coral-embed-stream/src/Comment.js @@ -8,6 +8,7 @@ import React, {PropTypes} from 'react'; import PermalinkButton from 'coral-plugin-permalinks/PermalinkButton'; + // import AuthorName from '../../coral-plugin-author-name/AuthorName'; import Content from '../../coral-plugin-commentcontent/CommentContent'; import PubDate from '../../coral-plugin-pubdate/PubDate'; diff --git a/client/coral-embed-stream/src/Embed.js b/client/coral-embed-stream/src/Embed.js index 8ddc215cb..cf336256c 100644 --- a/client/coral-embed-stream/src/Embed.js +++ b/client/coral-embed-stream/src/Embed.js @@ -1,4 +1,5 @@ import React, {Component, PropTypes} from 'react'; + // import Pym from 'pym.js'; import {compose} from 'react-apollo'; import {connect} from 'react-redux'; diff --git a/client/coral-embed-stream/src/graphql/mutations/index.js b/client/coral-embed-stream/src/graphql/mutations/index.js index 9dafe3152..383862455 100644 --- a/client/coral-embed-stream/src/graphql/mutations/index.js +++ b/client/coral-embed-stream/src/graphql/mutations/index.js @@ -5,7 +5,7 @@ import DELETE_ACTION from './deleteAction.graphql'; export const postComment = graphql(POST_COMMENT, { props: ({mutate}) => ({ - postItem: ({asset_id, body, parent_id} /*, type */) => { + postItem: ({asset_id, body, parent_id} /* , type */ ) => { return mutate({ variables: { asset_id, diff --git a/client/coral-plugin-commentbox/CommentBox.js b/client/coral-plugin-commentbox/CommentBox.js index 90113180c..40ffbf277 100644 --- a/client/coral-plugin-commentbox/CommentBox.js +++ b/client/coral-plugin-commentbox/CommentBox.js @@ -8,12 +8,13 @@ const name = 'coral-plugin-commentbox'; class CommentBox extends Component { static propTypes = { - postItem: PropTypes.func.isRequired, + // updateItem: PropTypes.func, + // comments: PropTypes.array, + postItem: PropTypes.func.isRequired, assetId: PropTypes.string.isRequired, parentId: PropTypes.string, authorId: PropTypes.string.isRequired, - // comments: PropTypes.array, isReply: PropTypes.bool.isRequired, canPost: PropTypes.bool, currentUser: PropTypes.object @@ -26,13 +27,14 @@ class CommentBox extends Component { postComment = () => { const { - postItem, + + // child_id, // updateItem, + // appendItemArray, + postItem, assetId, parentId, - // child_id, addNotification, - // appendItemArray, authorId } = this.props; @@ -44,6 +46,7 @@ class CommentBox extends Component { }; console.log('CommentBox.parentId', parentId); + // let related; // let parent_type; // if (parent_id) { @@ -64,12 +67,14 @@ class CommentBox extends Component { postItem(comment, 'comments') .then(({data}) => { const postedComment = data.createComment; + // const commentId = postedComment.id; if (postedComment.status === 'rejected') { addNotification('error', lang.t('comment-post-banned-word')); } else if (postedComment.status === 'PREMOD') { addNotification('success', lang.t('comment-post-notif-premod')); } else { + // appendItemArray(parent_id || id, related, commentId, !parent_id, parent_type); addNotification('success', 'Your comment has been posted.'); } diff --git a/client/coral-plugin-replies/ReplyButton.js b/client/coral-plugin-replies/ReplyButton.js index f6cf00194..68374fd2f 100644 --- a/client/coral-plugin-replies/ReplyButton.js +++ b/client/coral-plugin-replies/ReplyButton.js @@ -4,7 +4,7 @@ import translations from './translations.json'; const name = 'coral-plugin-replies'; -const ReplyButton = ({banned, parentCommentId, currentUserId, onClick}) => { +const ReplyButton = ({banned, onClick}) => { return (