- user,
-}) => <Container className={getClassName(tournament, user)} fluid>
- <Row>
- <Col lg={8} xl={9}>
- <div className="d-flex align-items-center justify-content-between">
- <h1>{tournament.title}</h1>
- <div className="button-bar">
- <ApplicationsButton tournament={tournament} />
- <ApplyButton tournament={tournament} />
- {mayUpdateTournament(user, tournament) ?
- <SettingsButton tournament={tournament} />
+}) => {
+ const { t } = useTranslation();
+ const { user } = useUser();
+
+ return <Container className={getClassName(tournament, user)} fluid>
+ <Row>
+ <Col lg={8} xl={9}>
+ <div className="d-flex align-items-center justify-content-between">
+ <h1>{tournament.title}</h1>
+ <div className="button-bar">
+ <ApplicationsButton tournament={tournament} />
+ <ApplyButton tournament={tournament} />
+ {mayUpdateTournament(user, tournament) ?
+ <SettingsButton tournament={tournament} />
+ : null}
+ {mayViewProtocol(user, tournament) ?
+ <Protocol id={tournament.id} />
+ : null}
+ </div>
+ </div>
+ </Col>
+ </Row>
+ <Row>
+ <Col lg={{ order: 2, span: 4 }} xl={{ order: 2, span: 3 }}>
+ <div className="tournament-sidebar">
+ {hasScoreboard(tournament) ? <>
+ <div className="d-flex align-items-center justify-content-between">
+ <h2>{t('tournaments.scoreboard')}</h2>
+ {hasRunners(tournament) && tournament.rounds.length > 2 ?
+ <ScoreChartButton tournament={tournament} />
+ : null}
+ </div>
+ {hasRunners(tournament) ?
+ <Scoreboard tournament={tournament} />
+ : null}
+ </> : null}
+ {hasTournamentAdmins(tournament) ?
+ <>
+ <div className="d-flex align-items-center justify-content-between">
+ <h2>{t('tournaments.admins')}</h2>
+ </div>
+ {getTournamentAdmins(tournament).map(p =>
+ <p key={p.id}><Box user={p.user} /></p>
+ )}
+ </>