Files
gridpilot.gg/apps/website/lib/view-models/RaceStatsViewModel.ts
Marc Mintel d97f50ed72
Some checks failed
Contract Testing / contract-tests (pull_request) Failing after 6m4s
Contract Testing / contract-snapshot (pull_request) Has been skipped
view data fixes
2026-01-23 11:59:49 +01:00

21 lines
499 B
TypeScript

import type { RaceStatsDTO } from '@/lib/types/generated/RaceStatsDTO';
/**
* Race stats view model
* Represents race statistics for display
*/
import { ViewModel } from "../contracts/view-models/ViewModel";
export class RaceStatsViewModel extends ViewModel {
totalRaces: number;
constructor(dto: RaceStatsDTO) {
this.totalRaces = dto.totalRaces;
}
/** UI-specific: Formatted total races */
get formattedTotalRaces(): string {
return this.totalRaces.toLocaleString();
}
}