import Link from 'next/link' import { TeamFlag } from './team-flag' import { LiveBadge } from './live-badge' interface Team { name: string; iso2?: string | null } interface Match { id: number year: number round: string group?: string | null date?: string | null time?: string | null team1: Team team2: Team scoreFt?: number[] | null scoreEt?: number[] | null scoreP?: number[] | null isLive: boolean } function formatDate(d: string) { return new Date(d).toLocaleDateString('en-GB', { day: 'numeric', month: 'short', year: 'numeric' }) } export function MatchCard({ match, compact = false }: { match: Match; compact?: boolean }) { const ft = match.scoreFt const hasScore = ft != null const winner = ft ? (ft[0] > ft[1] ? 'home' : ft[0] < ft[1] ? 'away' : 'draw') : null if (compact) { return (