import React, { Fragment } from 'react' import isEmpty from 'lodash/isEmpty' import { getSportColor } from 'helpers/getSportColor' import { SportName } from 'features/Common/SportName' import { useScoreStore } from 'features/ToggleScore' import { useSportNameParam } from 'hooks/useSportNameParam' import { useMatchPage } from '../hooks' import { Wrapper, Teams, Score, Tournament, Dash, } from './styled' export const MatchProfileCard = () => { const { matchProfile, matchProfileNames: { team1Name, team2Name, tournament, }, } = useMatchPage() const { sportName, sportType } = useSportNameParam() const { isHidden } = useScoreStore() const { team1, team2 } = matchProfile || {} const color = getSportColor(sportType) return ( {!isEmpty(matchProfile) && ( {team1Name} {team2Name} {!isHidden && ( {team1?.score} : {team2?.score} )} {tournament} )} ) }