Add character selection modal to Leaderboard: Implement a modal for displaying detailed user profiles when a leaderboard entry is clicked. This includes user avatar, rank, character class, score, level, and bio, enhancing user interaction and profile visibility.

This commit is contained in:
Julien Froidefond
2025-12-09 22:11:47 +01:00
parent b245be3bf4
commit 0ac6dbd423
4 changed files with 311 additions and 154 deletions

View File

@@ -11,6 +11,7 @@ export async function GET() {
select: {
id: true,
username: true,
email: true,
score: true,
level: true,
avatar: true,
@@ -24,6 +25,7 @@ export async function GET() {
user: {
id: string;
username: string;
email: string;
score: number;
level: number;
avatar: string | null;
@@ -34,6 +36,7 @@ export async function GET() {
) => ({
rank: index + 1,
username: user.username,
email: user.email,
score: user.score,
level: user.level,
avatar: user.avatar,