patchResult,
patchRound,
patchUser,
+ removeApplication,
sortParticipants,
} from '../../helpers/Tournament';
setError(null);
setLoading(false);
setTournament(sortParticipants(response.data));
+ window.document.title = response.data.title;
})
.catch(error => {
setError(error);
setTournament(tournament => patchApplication(tournament, e.application));
}
})
+ .listen('ApplicationRemoved', e => {
+ if (e.application_id) {
+ setTournament(tournament => removeApplication(tournament, e.application_id));
+ }
+ })
.listen('ParticipantChanged', e => {
+ console.log(e);
if (e.participant) {
setTournament(tournament => patchParticipant(tournament, e.participant));
}