mirror of
https://github.com/wassname/talk.git
synced 2026-07-05 20:33:41 +08:00
Adds click to showAll and refresh query to the '# comments' tab.
This commit is contained in:
@@ -144,7 +144,13 @@ class Embed extends Component {
|
||||
<div style={expandForLogin}>
|
||||
<div className="commentStream">
|
||||
<TabBar onChange={this.changeTab} activeTab={activeTab}>
|
||||
<Tab><Count count={asset.totalCommentCount}/></Tab>
|
||||
<Tab><Count
|
||||
count={asset.totalCommentCount}
|
||||
onClick={()=> {
|
||||
this.props.viewAllComments();
|
||||
this.props.data.refetch();
|
||||
}}/>
|
||||
</Tab>
|
||||
<Tab>{lang.t('MY_COMMENTS')}</Tab>
|
||||
<Tab restricted={!isAdmin}>Configure Stream</Tab>
|
||||
</TabBar>
|
||||
|
||||
@@ -3,8 +3,8 @@ import {I18n} from '../coral-framework';
|
||||
import translations from './translations.json';
|
||||
const name = 'coral-plugin-comment-count';
|
||||
|
||||
const CommentCount = ({count}) => {
|
||||
return <div className={`${name}-text`}>
|
||||
const CommentCount = ({count, onClick}) => {
|
||||
return <div className={`${name}-text`} onClick={() => onClick()}>
|
||||
{`${count} ${count === 1 ? lang.t('comment') : lang.t('comment-plural')}`}
|
||||
</div>;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user