website refactor
This commit is contained in:
34
apps/website/lib/view-data/LeaguesViewData.ts
Normal file
34
apps/website/lib/view-data/LeaguesViewData.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
/**
|
||||
* Leagues ViewData
|
||||
*
|
||||
* SSR-safe data structure that can be built directly from DTO
|
||||
* without ViewModel instantiation. Contains formatted values
|
||||
* for display and ISO string timestamps for JSON serialization.
|
||||
*/
|
||||
|
||||
export interface LeaguesViewData {
|
||||
leagues: Array<{
|
||||
id: string;
|
||||
name: string;
|
||||
description: string | null;
|
||||
logoUrl: string | null;
|
||||
ownerId: string;
|
||||
createdAt: string; // ISO string
|
||||
maxDrivers: number;
|
||||
usedDriverSlots: number;
|
||||
maxTeams: number | undefined;
|
||||
usedTeamSlots: number | undefined;
|
||||
structureSummary: string;
|
||||
timingSummary: string;
|
||||
category: string | null;
|
||||
scoring: {
|
||||
gameId: string;
|
||||
gameName: string;
|
||||
primaryChampionshipType: string;
|
||||
scoringPresetId: string;
|
||||
scoringPresetName: string;
|
||||
dropPolicySummary: string;
|
||||
scoringPatternSummary: string;
|
||||
} | undefined;
|
||||
}>;
|
||||
}
|
||||
Reference in New Issue
Block a user