diff --git a/components/team-flag.tsx b/components/team-flag.tsx index 541d4a2..a0ea302 100644 --- a/components/team-flag.tsx +++ b/components/team-flag.tsx @@ -1,4 +1,4 @@ -import { getIso } from '@/lib/iso-codes' +import { TEAM_ISO, getIso } from '@/lib/iso-codes' interface Props { name: string @@ -17,7 +17,9 @@ const placeholderSize = { } export function TeamFlag({ name, iso2, size = 'md', className = '' }: Props) { - const code = iso2 !== undefined ? iso2 : getIso(name) + // If the name is in our registry, trust it over the DB value (which may be stale). + // For unknown teams, fall back to the DB iso2. + const code = name in TEAM_ISO ? TEAM_ISO[name] : (iso2 ?? getIso(name)) if (!code) { const abbr = name