]> git.localhorst.tv Git - alttp.git/blobdiff - resources/js/components/rounds/List.js
compact keysanity tracker
[alttp.git] / resources / js / components / rounds / List.js
index 2ac8f1701d9074094e705035c928f326dd5522f4..5aa2a4c77eece85242122452edf11c6c7070c787 100644 (file)
@@ -4,12 +4,14 @@ import { Alert } from 'react-bootstrap';
 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
@@ -19,13 +21,17 @@ const List = ({
                        />
                )}
        </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,
        })),