]> git.localhorst.tv Git - alttp.git/blob - resources/js/components/results/List.js
tournament admins
[alttp.git] / resources / js / components / results / List.js
1 import PropTypes from 'prop-types';
2 import React from 'react';
3
4 import Item from './Item';
5 import { sortByResult } from '../../helpers/Participant';
6 import { getRunners } from '../../helpers/Tournament';
7
8 const List = ({ round, tournament }) => <div className="results d-flex flex-wrap">
9         {sortByResult(getRunners(tournament), round).map((participant, index) =>
10                 <Item
11                         index={index}
12                         key={participant.id}
13                         participant={participant}
14                         round={round}
15                         tournament={tournament}
16                 />
17         )}
18 </div>;
19
20 List.propTypes = {
21         round: PropTypes.shape({
22         }),
23         tournament: PropTypes.shape({
24                 participants: PropTypes.arrayOf(PropTypes.shape({
25                 })),
26         }),
27 };
28
29 export default List;