website refactor

This commit is contained in:
2026-01-20 23:50:29 +01:00
parent 7cbec00474
commit 4516427a19
30 changed files with 735 additions and 772 deletions

View File

@@ -7,13 +7,15 @@ export class LeaderboardsViewDataBuilder {
apiDto: { drivers: { drivers: DriverLeaderboardItemDTO[] }; teams: GetTeamsLeaderboardOutputDTO }
): LeaderboardsViewData {
return {
drivers: apiDto.drivers.drivers.slice(0, 10).map(driver => ({
drivers: apiDto.drivers.drivers.map(driver => ({
id: driver.id,
name: driver.name,
rating: driver.rating,
skillLevel: driver.skillLevel,
nationality: driver.nationality,
wins: driver.wins,
podiums: driver.podiums,
racesCompleted: driver.racesCompleted,
rank: driver.rank,
avatarUrl: driver.avatarUrl || '',
position: driver.rank,
@@ -25,6 +27,7 @@ export class LeaderboardsViewDataBuilder {
memberCount: team.memberCount,
category: undefined,
totalWins: team.totalWins || 0,
totalRaces: team.totalRaces || 0,
logoUrl: team.logoUrl || '',
position: index + 1,
isRecruiting: team.isRecruiting,

View File

@@ -252,6 +252,8 @@ export const routeMatchers = {
routes.public.drivers,
routes.public.teams,
routes.public.leaderboards,
routes.leaderboards.drivers,
routes.leaderboards.teams,
routes.public.races,
routes.public.sponsorSignup,
routes.auth.login,

View File

@@ -5,7 +5,9 @@ export interface LeaderboardDriverItem {
skillLevel: string;
nationality: string;
wins: number;
podiums: number;
racesCompleted: number;
rank: number;
avatarUrl: string;
position: number;
}
}

View File

@@ -5,7 +5,7 @@ export interface LeaderboardTeamItem {
memberCount: number;
category?: string;
totalWins: number;
totalRaces?: number;
totalRaces: number;
logoUrl: string;
position: number;
isRecruiting: boolean;