]> git.localhorst.tv Git - alttp.git/commitdiff
hide apply button for runners
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Sat, 9 Apr 2022 19:12:57 +0000 (21:12 +0200)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Sat, 9 Apr 2022 19:12:57 +0000 (21:12 +0200)
resources/js/components/tournament/ApplyButton.js

index bd944c903d53556595b3d3ebb8600f1d74d1aa2b..601eb938e5f46d4e525da90737599e9c935ebc80 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 (!tournament.accept_applications || isRunner(user, tournament)) return null;
 
        return <span className="d-inline-block" title={getTitle(user, tournament)}>
                <Button