This commit is contained in:
2025-12-12 01:11:36 +01:00
parent ec3ddc3a5c
commit 6a88fe93ab
125 changed files with 1513 additions and 803 deletions

View File

@@ -33,17 +33,20 @@ function hashString(input: string): number {
export function getDriverAvatar(driverId: string): string {
const index = hashString(driverId) % DRIVER_AVATARS.length;
return DRIVER_AVATARS[index];
const avatar = DRIVER_AVATARS[index] ?? DRIVER_AVATARS[0];
return avatar;
}
export function getTeamLogo(teamId: string): string {
const index = hashString(teamId) % TEAM_LOGOS.length;
return TEAM_LOGOS[index];
const logo = TEAM_LOGOS[index] ?? TEAM_LOGOS[0];
return logo;
}
export function getLeagueBanner(leagueId: string): string {
const index = hashString(leagueId) % LEAGUE_BANNERS.length;
return LEAGUE_BANNERS[index];
const banner = LEAGUE_BANNERS[index] ?? LEAGUE_BANNERS[0];
return banner;
}
export interface LeagueCoverImage {