website refactor
This commit is contained in:
29
apps/website/lib/view-data/races/RacesViewData.ts
Normal file
29
apps/website/lib/view-data/races/RacesViewData.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
/**
|
||||
* Races View Data
|
||||
*
|
||||
* ViewData for the main races page template.
|
||||
* JSON-serializable, template-ready data structure.
|
||||
*/
|
||||
|
||||
export interface RacesRace {
|
||||
id: string;
|
||||
track: string;
|
||||
car: string;
|
||||
scheduledAt: string;
|
||||
status: 'scheduled' | 'running' | 'completed' | 'cancelled';
|
||||
sessionType: string;
|
||||
leagueId?: string;
|
||||
leagueName?: string;
|
||||
strengthOfField?: number;
|
||||
isUpcoming: boolean;
|
||||
isLive: boolean;
|
||||
isPast: boolean;
|
||||
}
|
||||
|
||||
export interface RacesViewData {
|
||||
races: RacesRace[];
|
||||
totalCount: number;
|
||||
scheduledRaces: RacesRace[];
|
||||
runningRaces: RacesRace[];
|
||||
completedRaces: RacesRace[];
|
||||
}
|
||||
Reference in New Issue
Block a user