+import User from './User';
+
export const compareFinished = round => (a, b) => {
const a_result = findResult(a, round);
const b_result = findResult(b, round);
};
export const compareUsername = (a, b) => {
- const a_name = a && a.user && a.user.username ? a.user.username : '';
- const b_name = b && b.user && b.user.username ? b.user.username : '';
+ const a_name = a && a.user ? User.getUserName(a.user) : '';
+ const b_name = b && b.user ? User.getUserName(b.user) : '';
return a_name.localeCompare(b_name);
};