Sort performances by their rank and not by their differences
This commit is contained in:
parent
9a8230f254
commit
287ffe6cc5
|
|
@ -58,9 +58,7 @@ class StatisticsComponent extends React.Component {
|
|||
* comparison(p1, p2) = 0 => p1 = p2
|
||||
* comparison(p1, p2) > 0 => p1 > p2
|
||||
*/
|
||||
let sortedPerformances = sort(performances, (p1, p2) => {
|
||||
return (p2.winlossdifferential - p1.winlossdifferential) * 100 + (p2.pointDifferential - p1.pointDifferential);
|
||||
}, Order.descending);
|
||||
let sortedPerformances = sort(performances, (p1, p2) => p1.rank - p2.rank, Order.descending);
|
||||
|
||||
return (
|
||||
<Card className="shadow">
|
||||
|
|
|
|||
Loading…
Reference in New Issue