finished many ui changes + polishing dopamine hits
This commit is contained in:
@@ -36,11 +36,11 @@ async function getLeaderboard(grade, sortBy = 'elo', limit = 10) {
|
||||
orderBy,
|
||||
take: limit,
|
||||
include: {
|
||||
user: { select: { displayName: true, avatarUrl: true } },
|
||||
user: { select: { displayName: true, avatarUrl: true, username: true } },
|
||||
},
|
||||
});
|
||||
|
||||
return entries.map((entry, index) => ({ ...entry, rank: index + 1 }));
|
||||
return entries.map((entry, index) => ({ ...entry, ...entry.user, rank: index + 1 }));
|
||||
}
|
||||
|
||||
async function getUserRank(userId, grade, sortBy = 'elo') {
|
||||
|
||||
Reference in New Issue
Block a user