Skip to content

Commit

Permalink
Merge pull request #389 from bijomathewjose/old-dev
Browse files Browse the repository at this point in the history
leaderboard logic updation
  • Loading branch information
AswinAsok authored Jul 2, 2023
2 parents e35e0df + e827ecf commit 258d7f0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Pages/MutechLeaderBoard/MutechLeaderBoard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ const MutechLeaderBoard = () => {
function sortScore(PeopleScoreBoard) {
const scoreSet = Object.values(PeopleScoreBoard)
const scoreBoard = scoreSet.sort((a, b) => {
if (a.streak === b.streak)
return b.score - a.score
return b.streak - a.streak
})
setScoreBoard(scoreBoard)
Expand Down

0 comments on commit 258d7f0

Please sign in to comment.