Files
talk/client/coral-embed-stream/src/components/NewCount.js
T
2017-07-04 21:32:33 +07:00

25 lines
582 B
JavaScript

import React, {PropTypes} from 'react';
import t from 'coral-framework/services/i18n';
const NewCount = ({count, loadMore}) => {
return <div className='talk-new-comments talk-load-more'>
{
count ?
<button onClick={loadMore}>
{count === 1
? t('framework.new_count', count, t('framework.comment'))
: t('framework.new_count', count, t('framework.comments'))}
</button>
: null
}
</div>;
};
NewCount.propTypes = {
count: PropTypes.number.isRequired,
loadMore: PropTypes.func.isRequired,
};
export default NewCount;