X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=resources%2Fjs%2Fcomponents%2Ftournament%2FApplyButton.js;h=a6bde2f7ac5e622e4321d6056c83f0f4802aab9d;hb=f446d5bcf3b87bd9443a060e27e9c0601c96fbb9;hp=bd944c903d53556595b3d3ebb8600f1d74d1aa2b;hpb=3a774bb649734fc3a2135ec1b52cef9a049880ee;p=alttp.git diff --git a/resources/js/components/tournament/ApplyButton.js b/resources/js/components/tournament/ApplyButton.js index bd944c9..a6bde2f 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 (!user || !tournament.accept_applications || isRunner(user, tournament)) return null; return