]> git.localhorst.tv Git - alttp.git/blob - resources/js/components/results/List.js
448736a97bef7ee787ba6b7987f66ec9f370ced8
[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
7 const List = ({ round, tournament }) => <div className="results d-flex">
8         {sortByResult(tournament.participants, round).map(participant =>
9                 <Item
10                         key={participant.id}
11                         participant={participant}
12                         round={round}
13                         tournament={tournament}
14                 />
15         )}
16 </div>;
17
18 List.propTypes = {
19         round: PropTypes.shape({
20         }),
21         tournament: PropTypes.shape({
22                 participants: PropTypes.arrayOf(PropTypes.shape({
23                 })),
24         }),
25 };
26
27 export default List;