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