import { withTranslation } from 'react-i18next';
import Item from './Item';
+import LoadMore from './LoadMore';
import i18n from '../../i18n';
const List = ({
+ loadMore,
rounds,
tournament,
-}) => rounds && rounds.length ?
+}) => rounds && rounds.length ? <>
<ol className="rounds">
{rounds.map(round =>
<Item
/>
)}
</ol>
-:
+ {loadMore ?
+ <LoadMore loadMore={loadMore} />
+ : null}
+</> :
<Alert variant="info">
{i18n.t('rounds.empty')}
</Alert>
;
List.propTypes = {
+ loadMore: PropTypes.func,
rounds: PropTypes.arrayOf(PropTypes.shape({
id: PropTypes.number,
})),