website refactor

This commit is contained in:
2026-01-16 01:00:03 +01:00
parent ce7be39155
commit a98e3e3166
286 changed files with 5522 additions and 5261 deletions

View File

@@ -6,7 +6,7 @@
export class AvailableLeaguesViewModel {
leagues: AvailableLeagueViewModel[];
constructor(leagues: any[]) {
constructor(leagues: unknown[]) {
this.leagues = leagues.map(league => new AvailableLeagueViewModel(league));
}
}
@@ -25,19 +25,21 @@ export class AvailableLeagueViewModel {
seasonStatus: 'active' | 'upcoming' | 'completed';
description: string;
constructor(data: any) {
this.id = data.id;
this.name = data.name;
this.game = data.game;
this.drivers = data.drivers;
this.avgViewsPerRace = data.avgViewsPerRace;
this.mainSponsorSlot = data.mainSponsorSlot;
this.secondarySlots = data.secondarySlots;
this.rating = data.rating;
this.tier = data.tier;
this.nextRace = data.nextRace;
this.seasonStatus = data.seasonStatus;
this.description = data.description;
constructor(data: unknown) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const d = data as any;
this.id = d.id;
this.name = d.name;
this.game = d.game;
this.drivers = d.drivers;
this.avgViewsPerRace = d.avgViewsPerRace;
this.mainSponsorSlot = d.mainSponsorSlot;
this.secondarySlots = d.secondarySlots;
this.rating = d.rating;
this.tier = d.tier;
this.nextRace = d.nextRace;
this.seasonStatus = d.seasonStatus;
this.description = d.description;
}
get formattedAvgViews(): string {