diff --git a/client/coral-embed-stream/src/Comment.js b/client/coral-embed-stream/src/Comment.js
index d13729f8f..71fe3723f 100644
--- a/client/coral-embed-stream/src/Comment.js
+++ b/client/coral-embed-stream/src/Comment.js
@@ -10,7 +10,6 @@ import React, {PropTypes} from 'react';
import PermalinkButton from 'coral-plugin-permalinks/PermalinkButton';
const Comment = ({comment}) => {
- console.log('A Comment', comment);
return (
}
;
@@ -188,7 +190,8 @@ class Embed extends Component {
const mapStateToProps = state => (state);
-const mapDispatchToProps = (dispatch, ownProps) => ({
+const mapDispatchToProps = dispatch => ({
+
// addItem: (item, item_id) => dispatch(addItem(item, item_id)),
// updateItem: (id, property, value, itemType) => dispatch(updateItem(id, property, value, itemType)),
// postItem: (data, type, id) => {
@@ -198,8 +201,10 @@ const mapDispatchToProps = (dispatch, ownProps) => ({
// getStream: (rootId) => dispatch(getStream(rootId)),
addNotification: (type, text) => dispatch(addNotification(type, text)),
clearNotification: () => dispatch(clearNotification()),
+
// postAction: (item, itemType, action) => dispatch(postAction(item, itemType, action)),
showSignInDialog: (offset) => dispatch(showSignInDialog(offset)),
+
// deleteAction: (item, action, user, itemType) => dispatch(deleteAction(item, action, user, itemType)),
// appendItemArray: (item, property, value, addToFront, itemType) => dispatch(appendItemArray(item, property, value, addToFront, itemType)),
// handleSignInDialog: () => dispatch(authActions.showSignInDialog()),
@@ -211,18 +216,14 @@ const pym = new Pym.Child({polling: 100});
let url = pym.parentUrl;
-import STREAM_QUERY from './graphql/queries/streamQuery.graphql';
-import POST_COMMENT from './graphql/mutations/postComment.graphql';
-
-console.log(STREAM_QUERY, POST_COMMENT)
export default compose(
graphql(STREAM_QUERY, {
- options: { variables: { asset_url: url } },
+ options: {variables: {asset_url: url}},
props: props => props,
}),
graphql(POST_COMMENT, {
- props: ({ownProps, mutate}) => ({
- postItem: ({asset_id, author_id, body}) => {
+ props: ({mutate}) => ({
+ postItem: ({asset_id, body}) => {
mutate({
variables: {
asset_id,
@@ -233,7 +234,7 @@ export default compose(
console.log('it workt');
console.log(data);
});
- }}),
+ }}),
}),
connect(mapStateToProps, mapDispatchToProps)
)(Embed);
diff --git a/client/coral-embed-stream/src/Stream.js b/client/coral-embed-stream/src/Stream.js
index 13dbaf35d..61cfcd29d 100644
--- a/client/coral-embed-stream/src/Stream.js
+++ b/client/coral-embed-stream/src/Stream.js
@@ -1,4 +1,4 @@
-import React, {Component, PropTypes} from 'react';
+import React, {PropTypes} from 'react';
import Comment from './Comment';
const Stream = ({comments}) => {
diff --git a/client/coral-framework/actions/items.js b/client/coral-framework/actions/items.js
index 78e3f64b7..e289e9f60 100644
--- a/client/coral-framework/actions/items.js
+++ b/client/coral-framework/actions/items.js
@@ -2,8 +2,6 @@ import coralApi from '../helpers/response';
import {fromJS} from 'immutable';
import {UPDATE_CONFIG} from '../constants/config';
-import gql from 'graphql-tag';
-
/**
* Action name constants
*/
@@ -191,22 +189,13 @@ export function getItemsArray (ids) {
* The newly put item to the item store
*/
-
-const postComment = gql`
- mutation CreateComment ($asset_id: ID!, $parent_id: ID, $body: String!) {
- createComment(asset_id:$asset_id, parent_id:$parent_id, body:$body) {
- ...commentView
- }
- }
-`;
-
export function postItem (item, type, id, mutate) {
console.log(
item,
type,
id,
mutate
- )
+ );
mutate({
variables: {
asset_id: id,
diff --git a/client/coral-framework/reducers/index.js b/client/coral-framework/reducers/index.js
index e406a5524..2c862ebbd 100644
--- a/client/coral-framework/reducers/index.js
+++ b/client/coral-framework/reducers/index.js
@@ -1,4 +1,3 @@
-import {combineReducers} from 'redux';
import config from './config';
import items from './items';
import notification from './notification';
diff --git a/graph/mutators.js b/graph/mutators.js
index f5c600499..298a51404 100644
--- a/graph/mutators.js
+++ b/graph/mutators.js
@@ -118,7 +118,7 @@ const createPublicComment = (context, commentInput) => {
// If the comment was flagged as being suspect, we need to add a
// flag to it to indicate that it needs to be looked at.
// Otherwise just return the new comment.
- if (wordlist != null && wordlist.suspect) {
+ if (wordlist !== null && wordlist.suspect) {
// TODO: this is kind of fragile, we should refactor this to resolve
// all these const's that we're using like 'comments', 'flag' to be