mirror of
https://github.com/wassname/talk.git
synced 2026-06-28 23:58:38 +08:00
19 lines
479 B
JavaScript
19 lines
479 B
JavaScript
import React, {PropTypes} from 'react';
|
|
import {I18n} from '../coral-framework';
|
|
import translations from './translations.json';
|
|
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(translations);
|