Add bio field to user model and update related components: Enhance leaderboard and profile features by including a bio field in user data. Update API routes, UI components, and validation logic to support bio input and display, improving user profiles and leaderboard entries.

This commit is contained in:
Julien Froidefond
2025-12-09 22:00:19 +01:00
parent 16b0437ecb
commit 3a0dd57bb6
13 changed files with 147 additions and 24 deletions

View File

@@ -9,6 +9,7 @@ interface LeaderboardEntry {
score: number;
level: number;
avatar: string | null;
bio: string | null;
}
export default async function LeaderboardPage() {
@@ -23,6 +24,7 @@ export default async function LeaderboardPage() {
score: true,
level: true,
avatar: true,
bio: true,
},
});
@@ -32,6 +34,7 @@ export default async function LeaderboardPage() {
score: user.score,
level: user.level,
avatar: user.avatar,
bio: user.bio,
}));
const backgroundImage = await getBackgroundImage(