+import Participant from './Participant';
import Round from './Round';
export const findParticipant = (tournament, user) => {
};
};
+export const sortParticipants = tournament => {
+ if (!tournament || !tournament.participants || !tournament.participants.length) {
+ return tournament;
+ }
+ return {
+ ...tournament,
+ participants: tournament.participants.sort(Participant.compareUsername),
+ };
+};
+
export default {
findParticipant,
patchResult,
+ sortParticipants,
};