+export const sortParticipants = tournament => {
+ if (!tournament || !tournament.participants || !tournament.participants.length) {
+ return tournament;
+ }
+ return {
+ ...tournament,
+ participants: tournament.participants.sort(Participant.compareUsername),
+ };
+};
+