]> git.localhorst.tv Git - alttp.git/blobdiff - resources/js/components/tournament/Detail.js
tournament settings
[alttp.git] / resources / js / components / tournament / Detail.js
index d4e23cdba4e0ca359a634d2fda2b73e896e595c1..66b425e83740e4c0b81cdf10efa6cc2368016c04 100644 (file)
@@ -6,6 +6,7 @@ import { withTranslation } from 'react-i18next';
 import ApplyButton from './ApplyButton';
 import Scoreboard from './Scoreboard';
 import ScoreChartButton from './ScoreChartButton';
+import SettingsButton from './SettingsButton';
 import ApplicationsButton from '../applications/Button';
 import Protocol from '../protocol/Protocol';
 import Rounds from '../rounds/List';
@@ -13,6 +14,7 @@ import Box from '../users/Box';
 import {
        isRunner,
        mayAddRounds,
+       mayUpdateTournament,
        mayViewProtocol,
 } from '../../helpers/permissions';
 import {
@@ -50,6 +52,9 @@ const Detail = ({
                                <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}