Files
talk/client/coral-plugin-comment-count/CommentCount.js
T
2017-06-01 22:37:25 +07:00

18 lines
400 B
JavaScript

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