This commit is contained in:
2026-06-22 15:44:54 -05:00
parent f5ab324cca
commit 73d07e7f18
12 changed files with 385 additions and 42 deletions

View File

@@ -59,8 +59,10 @@ interface FdMatchesResponse {
matchday?: number | null;
stage: string;
group?: string | null;
homeTeam: { id: number | null; name: string | null; tla?: string | null };
awayTeam: { id: number | null; name: string | null; tla?: string | null };
venue?: string | null;
attendance?: number | null;
homeTeam: { id: number | null; name: string | null; tla?: string | null; crest?: string | null };
awayTeam: { id: number | null; name: string | null; tla?: string | null; crest?: string | null };
score: { fullTime: { home: number | null; away: number | null } };
}>;
}
@@ -97,7 +99,10 @@ export async function fetchMatchesAndTeams(): Promise<{ matches: Match[]; teams:
if (side.id != null && side.name && group) {
const id = String(side.id);
if (!teamMap.has(id)) {
teamMap.set(id, { id, name: side.name, code: side.tla ?? "", group });
teamMap.set(id, {
id, name: side.name, code: side.tla ?? "", group,
crest: side.crest ?? null,
});
}
}
}
@@ -113,6 +118,8 @@ export async function fetchMatchesAndTeams(): Promise<{ matches: Match[]; teams:
awayTeamId: m.awayTeam.id != null ? String(m.awayTeam.id) : null,
homeScore: m.score.fullTime.home,
awayScore: m.score.fullTime.away,
venue: m.venue ?? null,
attendance: m.attendance ?? null,
};
});