1 import PropTypes from 'prop-types';
2 import React from 'react';
3 import { Button } from 'react-bootstrap';
4 import { withTranslation } from 'react-i18next';
6 import SeedButton from './SeedButton';
7 import List from '../results/List';
8 import ReportButton from '../results/ReportButton';
9 import { maySetSeed, isParticipant } from '../../helpers/permissions';
10 import { findParticipant } from '../../helpers/Tournament';
11 import { withUser } from '../../helpers/UserContext';
12 import i18n from '../../i18n';
19 <li className="round d-flex">
20 <div className="info">
21 <p className="date">{i18n.t('rounds.date', { date: new Date(round.created_at) })}</p>
25 tournament={tournament}
28 {isParticipant(user, tournament) ?
29 <p className="report">
31 participant={findParticipant(tournament, user)}
33 tournament={tournament}
38 <List round={round} tournament={tournament} />
42 round: PropTypes.shape({
43 created_at: PropTypes.string,
44 seed: PropTypes.string,
46 tournament: PropTypes.shape({
47 participants: PropTypes.arrayOf(PropTypes.shape({
50 user: PropTypes.shape({
54 export default withTranslation()(withUser(Item));