Refactor character class handling across components: Replace hardcoded character class definitions with a centralized CHARACTER_CLASSES import, enhancing maintainability and consistency. Update ProfileForm, Leaderboard, and LeaderboardSection components to utilize new utility functions for character class icons and names, improving code clarity and reducing duplication.
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 2m48s
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 2m48s
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { prisma } from "../database";
|
||||
import type { User, Role, Prisma } from "@/prisma/generated/prisma/client";
|
||||
import type { User, Role, Prisma, CharacterClass } from "@/prisma/generated/prisma/client";
|
||||
import { NotFoundError } from "../errors";
|
||||
import { userService } from "./user.service";
|
||||
|
||||
@@ -19,7 +19,7 @@ export interface LeaderboardEntry {
|
||||
level: number;
|
||||
avatar: string | null;
|
||||
bio: string | null;
|
||||
characterClass: string | null;
|
||||
characterClass: CharacterClass | null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user