import React from 'react'; import { FiChevronLeft, FiChevronRight } from 'react-icons/fi'; import { TeamLogo } from '../common/TeamLogo'; import { sanitizeClubName } from '../../utils/url'; export type NextMatchData = { competition?: string; home_id?: any; home?: string; home_logo_url?: string; away_id?: any; away?: string; away_logo_url?: string; }; const NextMatch: React.FC<{ data: NextMatchData | null; competitionName?: string; countdown?: string; onPrev?: () => void; onNext?: () => void; onOpen?: () => void; elementProps?: any; }> = ({ data, competitionName, countdown, onPrev, onNext, onOpen, elementProps }) => { const show = data; return (
{ e.stopPropagation(); onOpen?.(); }} style={{ cursor: onOpen ? 'pointer' : 'default', position: 'relative', ...(elementProps?.style || {}) }} > {onPrev && ( )}
{sanitizeClubName(show?.home || '')}
{competitionName && (
{competitionName}
)} {countdown || '—'}
Začátek zápasu
{sanitizeClubName(show?.away || '')}
{onNext && ( )}
); }; export default NextMatch;