X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=resources%2Fjs%2Fcomponents%2Ftournament%2FDetail.js;h=912d2a26d58df7a0aedcdfd87a3249353bc1b949;hb=c30ac282dde3d746d6a7762ee18c70b4416500b5;hp=60c9d245716439653296fea58decc6659f4b8ae8;hpb=edd0e97bfdc544114f30bf4c13a929631c44a555;p=alttp.git diff --git a/resources/js/components/tournament/Detail.js b/resources/js/components/tournament/Detail.js index 60c9d24..912d2a2 100644 --- a/resources/js/components/tournament/Detail.js +++ b/resources/js/components/tournament/Detail.js @@ -4,8 +4,12 @@ import { Button, Container } from 'react-bootstrap'; 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'; @@ -16,6 +20,9 @@ const Detail = ({ }) =>

{tournament.title}

+ {mayViewProtocol(user, tournament) ? + + : null}

{i18n.t('participants.heading')}

@@ -39,6 +46,7 @@ const Detail = ({ Detail.propTypes = { addRound: PropTypes.func, tournament: PropTypes.shape({ + id: PropTypes.number, participants: PropTypes.arrayOf(PropTypes.shape({ })), rounds: PropTypes.arrayOf(PropTypes.shape({