]> git.localhorst.tv Git - alttp.git/blob - resources/js/components/rounds/Item.js
protocol frontend
[alttp.git] / resources / js / components / rounds / Item.js
1 import PropTypes from 'prop-types';
2 import React from 'react';
3 import { withTranslation } from 'react-i18next';
4
5 import List from '../results/List';
6 import i18n from '../../i18n';
7
8 const Item = ({ round, tournament }) => <li className="round d-flex">
9         <div className="date">
10                 {i18n.t('rounds.date', { date: new Date(round.created_at) })}
11         </div>
12         <List round={round} tournament={tournament} />
13 </li>;
14
15 Item.propTypes = {
16         round: PropTypes.shape({
17                 created_at: PropTypes.string,
18         }),
19         tournament: PropTypes.shape({
20                 participants: PropTypes.arrayOf(PropTypes.shape({
21                 })),
22         }),
23 };
24
25 export default withTranslation()(Item);