Removes handleClick as it is working now with the changeTab (as the viewAllComments was added). /cc @kiwi

This commit is contained in:
gaba
2017-04-12 11:58:41 -07:00
parent 48795b29bf
commit cbde4cc8bc
2 changed files with 3 additions and 10 deletions
+1 -8
View File
@@ -121,11 +121,6 @@ class Embed extends React.Component {
}
}
handleClick = () => {
this.props.viewAllComments();
this.props.data.refetch();
}
render () {
const {activeTab} = this.state;
const {closedAt, countCache = {}} = this.props.asset;
@@ -156,9 +151,7 @@ class Embed extends React.Component {
<div style={expandForLogin}>
<div className="commentStream">
<TabBar onChange={this.changeTab} activeTab={activeTab}>
<Tab><Count
count={asset.totalCommentCount}
handleClick={this.handleClick}/>
<Tab><Count count={asset.totalCommentCount}/>
</Tab>
<Tab>{lang.t('MY_COMMENTS')}</Tab>
<Tab restricted={!isAdmin}>Configure Stream</Tab>
@@ -3,8 +3,8 @@ import {I18n} from '../coral-framework';
import translations from './translations.json';
const name = 'coral-plugin-comment-count';
const CommentCount = ({count, handleClick}) => {
return <div className={`${name}-text`} onClick={handleClick}>
const CommentCount = ({count}) => {
return <div className={`${name}-text`}>
{`${count} ${count === 1 ? lang.t('comment') : lang.t('comment-plural')}`}
</div>;
};