website refactor
This commit is contained in:
@@ -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 };
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user