Files
talk/client/coral-plugin-comment-count/CommentCount.js
T
2017-05-17 12:53:36 -07:00

18 lines
394 B
JavaScript

import React, {PropTypes} from 'react';
import t from 'coral-i18n/services/i18n';
const name = 'coral-plugin-comment-count';
const CommentCount = ({count}) => {
return <div className={`${name}-text`}>
{`${count} ${count === 1 ? t('comment.comment') : t('comment_plural')}`}
</div>;
};
CommentCount.propTypes = {
count: PropTypes.number.isRequired
};
export default CommentCount;