From: Daniel Karbach Date: Sat, 9 Apr 2022 19:12:57 +0000 (+0200) Subject: hide apply button for runners X-Git-Url: https://git.localhorst.tv/?a=commitdiff_plain;h=d34eaa32d939ebf82a86a1d87c2162774512ef12;p=alttp.git hide apply button for runners --- diff --git a/resources/js/components/tournament/ApplyButton.js b/resources/js/components/tournament/ApplyButton.js index bd944c9..601eb93 100644 --- a/resources/js/components/tournament/ApplyButton.js +++ b/resources/js/components/tournament/ApplyButton.js @@ -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