mirror of
https://github.com/wassname/talk.git
synced 2026-07-20 12:40:47 +08:00
27 lines
650 B
JavaScript
27 lines
650 B
JavaScript
import React from 'react';
|
|
import PropTypes from 'prop-types';
|
|
import {Button} from 'coral-ui';
|
|
|
|
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;
|