website refactor

This commit is contained in:
2026-01-20 17:49:54 +01:00
parent 94aaaff704
commit b39b098e6b
18 changed files with 437 additions and 491 deletions

View File

@@ -13,10 +13,10 @@ export class TeamsViewDataBuilder {
const teams: TeamSummaryData[] = apiDto.teams.map((team: TeamListItemDTO): TeamSummaryData => ({
teamId: team.id,
teamName: team.name,
leagueName: team.leagues[0] || '',
memberCount: team.memberCount,
logoUrl: team.logoUrl,
ratingLabel: RatingDisplay.format(team.rating),
ratingValue: team.rating || 0,
winsLabel: NumberDisplay.format(team.totalWins || 0),
racesLabel: NumberDisplay.format(team.totalRaces || 0),
region: team.region,
@@ -24,6 +24,7 @@ export class TeamsViewDataBuilder {
category: team.category,
performanceLevel: team.performanceLevel,
description: team.description,
countryCode: team.region, // Assuming region contains country code for now
}));
return { teams };

View File

@@ -8,10 +8,10 @@ import { ViewData } from '../contracts/view-data/ViewData';
export interface TeamSummaryData {
teamId: string;
teamName: string;
leagueName: string;
memberCount: number;
logoUrl?: string;
ratingLabel: string;
ratingValue: number;
winsLabel: string;
racesLabel: string;
region?: string;
@@ -19,6 +19,7 @@ export interface TeamSummaryData {
category?: string;
performanceLevel?: string;
description?: string;
countryCode?: string;
}
export interface TeamsViewData extends ViewData {