Skip to content

Commit d29c21b

Browse files
committed
fix: reorder getters for leaderboard entries
Reorganize the code by moving the `sortedTopEntries` getter below the `sortedSurroundingEntries` getter for better readability and logical flow. This change enhances the structure of the leaderboard page component.
1 parent e709de7 commit d29c21b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

app/components/leaderboard-page/entries-table.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ Harder stages have higher scores assigned to them.
3939
return !!(this.authenticator.isAuthenticated && !this.userIsInTopLeaderboardEntries && this.sortedSurroundingEntries.length > 0);
4040
}
4141

42-
get sortedTopEntries() {
43-
return this.args.topEntries.filter((entry) => !entry.isBanned).sort((a, b) => b.score - a.score);
44-
}
45-
4642
get sortedSurroundingEntries() {
4743
return this.args.surroundingEntries.filter((entry) => !entry.isBanned).sort((a, b) => b.score - a.score);
4844
}
4945

46+
get sortedTopEntries() {
47+
return this.args.topEntries.filter((entry) => !entry.isBanned).sort((a, b) => b.score - a.score);
48+
}
49+
5050
get userIsInTopLeaderboardEntries(): boolean {
5151
if (!this.authenticator.isAuthenticated) {
5252
return false;

0 commit comments

Comments
 (0)