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';
};
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