1 import PropTypes from 'prop-types';
2 import React from 'react';
3 import { withTranslation } from 'react-i18next';
5 import SeedButton from './SeedButton';
6 import SeedCode from './SeedCode';
7 import List from '../results/List';
8 import ReportButton from '../results/ReportButton';
9 import { 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) })}
28 <SeedCode code={round.code} />
32 tournament={tournament}
35 {isParticipant(user, tournament) ?
36 <p className="report">
38 participant={findParticipant(tournament, user)}
40 tournament={tournament}
45 <List round={round} tournament={tournament} />
49 index: PropTypes.number,
50 round: PropTypes.shape({
51 code: PropTypes.arrayOf(PropTypes.string),
52 created_at: PropTypes.string,
53 seed: PropTypes.string,
55 tournament: PropTypes.shape({
56 participants: PropTypes.arrayOf(PropTypes.shape({
59 user: PropTypes.shape({
63 export default withTranslation()(withUser(Item));