From ce0227d3ad947253031122a2e7e2807ec7f96fa4 Mon Sep 17 00:00:00 2001 From: Pinapelz Date: Fri, 7 Nov 2025 12:56:30 -0800 Subject: chore: change ScoreDisplayProps and Score to be shared types --- frontend/src/types/game.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'frontend/src/types/game.ts') diff --git a/frontend/src/types/game.ts b/frontend/src/types/game.ts index 3c595ea..1f46fea 100644 --- a/frontend/src/types/game.ts +++ b/frontend/src/types/game.ts @@ -3,3 +3,21 @@ export interface SupportedGame { formattedName: string; description: string; } + +export interface Score { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + [key: string]: any; + timestamp: string | number; + username?: string; +} + +export interface ScoreDisplayProps { + scores: Score[]; + viewMode: "cards" | "table"; + sortField: string; + sortDirection: "asc" | "desc"; + onSort: (field: string) => void; + onDelete?: (scoreId: number) => void; + showUsername?: boolean; + hideTitleArtist?: boolean; +} -- cgit v1.2.3