+export const isApplicant = (user, tournament) => {
+ if (!user || !tournament || !tournament.applications) {
+ return false;
+ }
+ return tournament.applications.find(p => p.user && p.user.id == user.id);
+};
+
+export const isDeniedApplicant = (user, tournament) => {
+ if (!user || !tournament || !tournament.applications) {
+ return false;
+ }
+ const applicant = tournament.applications.find(p => p.user && p.user.id == user.id);
+ return applicant && applicant.denied;
+};
+