redux-course-2
redux-course-2 copied to clipboard
Users sorting not working
https://github.com/tylermcginnis/redux-polls/blob/fd31dd74c883eec7e231968c7cfcd109cfd57e59/src/components/Leaderboard.js#L36
The compare function passed into the sort function should use a -
instead of a >
.
.sort((a, b) => b.polls + b.answers - (a.polls + a.answers))