]> git.localhorst.tv Git - alttp.git/blobdiff - resources/js/components/tournament/ApplyButton.js
tournament settings
[alttp.git] / resources / js / components / tournament / ApplyButton.js
index bd944c903d53556595b3d3ebb8600f1d74d1aa2b..a6bde2f7ac5e622e4321d6056c83f0f4802aab9d 100644 (file)
@@ -6,7 +6,7 @@ import { withTranslation } from 'react-i18next';
 import toastr from 'toastr';
 
 import Icon from '../common/Icon';
-import { isApplicant, isDeniedApplicant, mayApply } from '../../helpers/permissions';
+import { isApplicant, isDeniedApplicant, isRunner, mayApply } from '../../helpers/permissions';
 import { withUser } from '../../helpers/UserContext';
 import i18n from '../../i18n';
 
@@ -30,7 +30,7 @@ const getTitle = (user, tournament) => {
 };
 
 const ApplyButton = ({ tournament, user }) => {
-       if (!tournament.accept_applications) return null;
+       if (!user || !tournament.accept_applications || isRunner(user, tournament)) return null;
 
        return <span className="d-inline-block" title={getTitle(user, tournament)}>
                <Button