Comment Count Component

This commit is contained in:
Belen Curcio
2017-02-17 13:55:35 -03:00
parent 7eca9db63c
commit 25f366c5f1
2 changed files with 6 additions and 6 deletions
@@ -2,11 +2,11 @@ import React, {PropTypes} from 'react';
import styles from './CommentCount.css';
const CommentCount = props => (
<span className={styles.count}>{props.children}</span>
<span className={styles.count}>{props.count}</span>
);
CommentCount.propTypes = {
children: PropTypes.node
count: PropTypes.number.isRequired
};
export default CommentCount;
@@ -16,14 +16,14 @@ const ModerationMenu = ({asset, premodCount, rejectedCount, flaggedCount}) => {
<div className={`mdl-tabs__tab-bar ${styles.tabBar}`}>
<div>
<Link to={premodPath} className={`mdl-tabs__tab ${styles.tab}`} activeClassName={styles.active}>
{lang.t('modqueue.premod')}<CommentCount>{premodCount}</CommentCount>
{lang.t('modqueue.premod')} <CommentCount count={premodCount} />
</Link>
<Link to={rejectPath} className={`mdl-tabs__tab ${styles.tab}`} activeClassName={styles.active}>
{lang.t('modqueue.rejected')}<CommentCount>{rejectedCount}</CommentCount>
{lang.t('modqueue.rejected')} <CommentCount count={rejectedCount} />
</Link>
<Link to={flagPath} className={`mdl-tabs__tab ${styles.tab}`} activeClassName={styles.active}>
{lang.t('modqueue.flagged')}<CommentCount>{flaggedCount}</CommentCount>
</Link>
{lang.t('modqueue.flagged')} <CommentCount count={flaggedCount} />
</Link>
</div>
</div>
</div>