From 56dedb551f4c8bf88c04a0b0aec7a01db259f082 Mon Sep 17 00:00:00 2001 From: gaba Date: Tue, 11 Apr 2017 15:02:04 -0700 Subject: [PATCH] Adds click to showAll and refresh query to the '# comments' tab. --- client/coral-embed-stream/src/Embed.js | 8 +++++++- client/coral-plugin-comment-count/CommentCount.js | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/client/coral-embed-stream/src/Embed.js b/client/coral-embed-stream/src/Embed.js index d9b5c8310..4df0290ac 100644 --- a/client/coral-embed-stream/src/Embed.js +++ b/client/coral-embed-stream/src/Embed.js @@ -144,7 +144,13 @@ class Embed extends Component {
- + { + this.props.viewAllComments(); + this.props.data.refetch(); + }}/> + {lang.t('MY_COMMENTS')} Configure Stream diff --git a/client/coral-plugin-comment-count/CommentCount.js b/client/coral-plugin-comment-count/CommentCount.js index 764984634..e53944025 100644 --- a/client/coral-plugin-comment-count/CommentCount.js +++ b/client/coral-plugin-comment-count/CommentCount.js @@ -3,8 +3,8 @@ import {I18n} from '../coral-framework'; import translations from './translations.json'; const name = 'coral-plugin-comment-count'; -const CommentCount = ({count}) => { - return
+const CommentCount = ({count, onClick}) => { + return
onClick()}> {`${count} ${count === 1 ? lang.t('comment') : lang.t('comment-plural')}`}
; };