diff --git a/client/coral-embed-stream/src/Embed.js b/client/coral-embed-stream/src/Embed.js index c3c0e78f7..54630847a 100644 --- a/client/coral-embed-stream/src/Embed.js +++ b/client/coral-embed-stream/src/Embed.js @@ -18,7 +18,7 @@ import {queryStream} from 'coral-framework/graphql/queries'; import {postComment, postFlag, postLike, postDontAgree, deleteAction, addCommentTag, removeCommentTag} from 'coral-framework/graphql/mutations'; import {editName} from 'coral-framework/actions/user'; import {updateCountCache} from 'coral-framework/actions/asset'; -import {notificationActions, authActions, assetActions, pym, Slot, actions} from 'coral-framework'; +import {notificationActions, authActions, assetActions, pym, actions} from 'coral-framework'; import Stream from './Stream'; import InfoBox from 'coral-plugin-infobox/InfoBox'; @@ -135,7 +135,6 @@ class Embed extends Component { return (
- {/* */} {lang.t('MY_COMMENTS')} diff --git a/plugins/coral-plugin-respect/client/index.js b/plugins/coral-plugin-respect/client/index.js index df729f096..a89f4046c 100644 --- a/plugins/coral-plugin-respect/client/index.js +++ b/plugins/coral-plugin-respect/client/index.js @@ -2,25 +2,28 @@ import React from 'react'; import styles from './style.css'; import {Icon} from 'coral-ui'; -export default (props) => { - const handleClick = () => { - // props.actions.clic kButton(); +const getActionSummary = (type, comment) => comment.action_summaries + .filter((a) => a.__typename === type)[0]; +export default (props) => { + const {comment} = props.context; + + const handleClick = () => { props.context.postRespect({ - item_id: props.context.comment.id, + item_id: comment.id, item_type: 'COMMENTS' }); }; - const {clicked} = props.state.respect; + + const respectActionSummary = getActionSummary('RespectActionSummary', comment); return (
);