Files
talk/client/coral-plugin-comment-count/CommentCount.js
T

19 lines
420 B
JavaScript

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