Sort performances by their rank and not by their differences

This commit is contained in:
Jonny 2019-05-02 09:54:49 +02:00 committed by JP1998
parent 9a8230f254
commit 287ffe6cc5
1 changed files with 1 additions and 3 deletions

View File

@ -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">