|
|
|
|
@ -45,6 +45,7 @@ export const CardFrontside = ({ |
|
|
|
|
const { |
|
|
|
|
accessibleBySubscription, |
|
|
|
|
accessibleInUsersCountry, |
|
|
|
|
calc, |
|
|
|
|
date, |
|
|
|
|
formattedDate, |
|
|
|
|
hasVideo, |
|
|
|
|
@ -60,9 +61,13 @@ export const CardFrontside = ({ |
|
|
|
|
const { open } = useBuyMatchPopupStore() |
|
|
|
|
const { isScoreHidden } = useMatchSwitchesStore() |
|
|
|
|
const { selectedMatchStatus } = useHeaderFiltersStore() |
|
|
|
|
const unixTimeOfMatch = getUnixTime(date) |
|
|
|
|
const isInFuture = unixTimeOfMatch > getUnixTime(new Date()) |
|
|
|
|
const isFutureMatch = isInFuture || selectedMatchStatus === MatchStatuses.Soon |
|
|
|
|
const isInFuture = getUnixTime(date) > getUnixTime(new Date()) |
|
|
|
|
const showScore = !( |
|
|
|
|
!calc |
|
|
|
|
|| isInFuture |
|
|
|
|
|| selectedMatchStatus === MatchStatuses.Soon |
|
|
|
|
|| isScoreHidden |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
<CardWrapper |
|
|
|
|
@ -121,11 +126,11 @@ export const CardFrontside = ({ |
|
|
|
|
<Teams> |
|
|
|
|
<Team> |
|
|
|
|
<TeamName nameObj={team1} /> |
|
|
|
|
{isFutureMatch ? null : !isScoreHidden && <Score>{team1.score}</Score>} |
|
|
|
|
{showScore && <Score>{team1.score}</Score>} |
|
|
|
|
</Team> |
|
|
|
|
<Team> |
|
|
|
|
<TeamName nameObj={team2} /> |
|
|
|
|
{isFutureMatch ? null : !isScoreHidden && <Score>{team2.score}</Score>} |
|
|
|
|
{showScore && <Score>{team2.score}</Score>} |
|
|
|
|
</Team> |
|
|
|
|
</Teams> |
|
|
|
|
</Info> |
|
|
|
|
|