import { withTranslation } from 'react-i18next';
import Participants from '../participants/List';
+import Protocol from '../protocol/Protocol';
import Rounds from '../rounds/List';
-import { mayAddRounds } from '../../helpers/permissions';
+import {
+ mayAddRounds,
+ mayViewProtocol,
+} from '../../helpers/permissions';
import { withUser } from '../../helpers/UserContext';
import i18n from '../../i18n';
}) => <Container>
<div className="d-flex align-items-center justify-content-between">
<h1>{tournament.title}</h1>
+ {mayViewProtocol(user, tournament) ?
+ <Protocol id={tournament.id} />
+ : null}
</div>
<div className="d-flex align-items-center justify-content-between">
<h2>{i18n.t('participants.heading')}</h2>
Detail.propTypes = {
addRound: PropTypes.func,
tournament: PropTypes.shape({
+ id: PropTypes.number,
participants: PropTypes.arrayOf(PropTypes.shape({
})),
rounds: PropTypes.arrayOf(PropTypes.shape({