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';
20 <li className="round d-flex">
21 <div className="info">
24 {i18n.t('rounds.date', { date: new Date(round.created_at) })}
29 tournament={tournament}
32 {isParticipant(user, tournament) ?
33 <p className="report">
35 participant={findParticipant(tournament, user)}
37 tournament={tournament}
42 <List round={round} tournament={tournament} />
46 index: PropTypes.number,
47 round: PropTypes.shape({
48 created_at: PropTypes.string,
49 seed: PropTypes.string,
51 tournament: PropTypes.shape({
52 participants: PropTypes.arrayOf(PropTypes.shape({
55 user: PropTypes.shape({
59 export default withTranslation()(withUser(Item));