From d34eaa32d939ebf82a86a1d87c2162774512ef12 Mon Sep 17 00:00:00 2001 From: Daniel Karbach Date: Sat, 9 Apr 2022 21:12:57 +0200 Subject: [PATCH] hide apply button for runners --- resources/js/components/tournament/ApplyButton.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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