import React from 'react'
import type { Match } from 'features/Matches'
import { SportName } from 'features/Common'
import { useCard } from '../hooks'
import { CardFinishedHover } from '../CardFinishedHover'
import {
CardWrapper,
Info,
MatchDate,
Preview,
PreviewWrapper,
Score,
Team,
TeamName,
Teams,
Time,
TournamentName,
} from '../styled'
type CardFinishedProps = {
match: Match,
}
export const CardFinished = ({
match: {
date,
id,
preview,
sportName,
sportType,
team1Name,
team1Score,
team2Name,
team2Score,
time,
tournamentName,
},
}: CardFinishedProps) => {
const {
close,
isOpen,
onKeyPress,
open,
showScore,
} = useCard()
if (isOpen) {
return (
)
}
return (
{date}
{tournamentName}
{team1Name}
{showScore && {team1Score}}
{team2Name}
{showScore && {team2Score}}
)
}