+import User from './User';
+
+export const compareFinished = round => (a, b) => {
+ const a_result = findResult(a, round);
+ const b_result = findResult(b, round);
+ const a_finished = a_result && a_result.has_finished;
+ const b_finished = b_result && b_result.has_finished;
+ if (a_finished) {
+ if (b_finished) {
+ return compareUsername(a, b);
+ }
+ return -1;
+ }
+ if (b_finished) {
+ return 1;
+ }
+ return compareUsername(a, b);
+};
+