|
|
|
|
@ -7,6 +7,7 @@ import { SportName } from 'features/Common' |
|
|
|
|
import { useMatchSwitchesStore } from 'features/MatchSwitches' |
|
|
|
|
import { useName } from 'features/Name' |
|
|
|
|
|
|
|
|
|
import { getUnixTime } from 'date-fns' |
|
|
|
|
import { NoAccessMessage } from '../NoAccessMessage' |
|
|
|
|
import { |
|
|
|
|
CardWrapper, |
|
|
|
|
@ -37,12 +38,15 @@ export const CardFrontside = ({ |
|
|
|
|
accessibleBySubscription, |
|
|
|
|
accessibleInUsersCountry, |
|
|
|
|
date, |
|
|
|
|
hasVideo, |
|
|
|
|
preview, |
|
|
|
|
sportType, |
|
|
|
|
storage, |
|
|
|
|
team1, |
|
|
|
|
team2, |
|
|
|
|
time, |
|
|
|
|
tournament, |
|
|
|
|
unformattedDate, |
|
|
|
|
}, |
|
|
|
|
onClick, |
|
|
|
|
onKeyPress, |
|
|
|
|
@ -50,6 +54,7 @@ export const CardFrontside = ({ |
|
|
|
|
}: Props) => { |
|
|
|
|
const tournamentName = useName(tournament) |
|
|
|
|
const { isScoreHidden } = useMatchSwitchesStore() |
|
|
|
|
const unixTimeOfMatch = getUnixTime(new Date(unformattedDate)) |
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
<CardWrapper |
|
|
|
|
@ -91,9 +96,13 @@ export const CardFrontside = ({ |
|
|
|
|
: ( |
|
|
|
|
<MatchDate> |
|
|
|
|
{date} |
|
|
|
|
<Time> |
|
|
|
|
{time} |
|
|
|
|
</Time> |
|
|
|
|
{unixTimeOfMatch > getUnixTime(new Date()) && (!hasVideo || !storage) |
|
|
|
|
? ( |
|
|
|
|
<Time> |
|
|
|
|
{time} |
|
|
|
|
</Time> |
|
|
|
|
) |
|
|
|
|
: null} |
|
|
|
|
</MatchDate> |
|
|
|
|
)} |
|
|
|
|
</PreviewWrapper> |
|
|
|
|
|