Skip to content

Commit

Permalink
filter out zero
Browse files Browse the repository at this point in the history
  • Loading branch information
0xlynett committed Sep 11, 2024
1 parent 0cde4d1 commit 329a2fe
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/components/Leaderboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export interface LeaderboardProps {
export default function Leaderboard({ list }: LeaderboardProps) {
return list
? list
.filter((a) => a.xp != 0)
.sort((a, b) => b.xp - a.xp)
.map(({ username, xp }, i) => {
return (
Expand Down

0 comments on commit 329a2fe

Please sign in to comment.