website refactor
This commit is contained in:
35
apps/website/lib/view-data/RacesViewData.ts
Normal file
35
apps/website/lib/view-data/RacesViewData.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
export interface RaceViewData {
|
||||
id: string;
|
||||
track: string;
|
||||
car: string;
|
||||
scheduledAt: string;
|
||||
scheduledAtLabel: string;
|
||||
timeLabel: string;
|
||||
relativeTimeLabel: string;
|
||||
status: 'scheduled' | 'running' | 'completed' | 'cancelled';
|
||||
statusLabel: string;
|
||||
sessionType: string;
|
||||
leagueId: string | null;
|
||||
leagueName: string | null;
|
||||
strengthOfField: number | null;
|
||||
isUpcoming: boolean;
|
||||
isLive: boolean;
|
||||
isPast: boolean;
|
||||
}
|
||||
|
||||
export interface RacesViewData {
|
||||
races: RaceViewData[];
|
||||
totalCount: number;
|
||||
scheduledCount: number;
|
||||
runningCount: number;
|
||||
completedCount: number;
|
||||
leagues: Array<{ id: string; name: string }>;
|
||||
upcomingRaces: RaceViewData[];
|
||||
liveRaces: RaceViewData[];
|
||||
recentResults: RaceViewData[];
|
||||
racesByDate: Array<{
|
||||
dateKey: string;
|
||||
dateLabel: string;
|
||||
races: RaceViewData[];
|
||||
}>;
|
||||
}
|
||||
Reference in New Issue
Block a user