diff --git a/src/features/MatchCard/CardFrontside/index.tsx b/src/features/MatchCard/CardFrontside/index.tsx index a9dbd0e8..9669bd19 100644 --- a/src/features/MatchCard/CardFrontside/index.tsx +++ b/src/features/MatchCard/CardFrontside/index.tsx @@ -26,6 +26,7 @@ import { TeamLogo, BuyMatchButton, } from '../styled' +import { MatchStatuses, useHeaderFiltersStore } from '../../HeaderFilters' type Props = { match: Match, @@ -55,7 +56,10 @@ export const CardFrontside = ({ }: Props) => { const tournamentName = useName(tournament) const { isScoreHidden } = useMatchSwitchesStore() + const { selectedMatchStatus } = useHeaderFiltersStore() const unixTimeOfMatch = getUnixTime(date) + const isInFuture = unixTimeOfMatch > getUnixTime(new Date()) + const isFutureMatch = isInFuture || selectedMatchStatus === MatchStatuses.Soon return ( } {formattedDate} - {unixTimeOfMatch > getUnixTime(new Date()) && (!hasVideo || !storage) - ? ( - - ) + {(isInFuture && (!hasVideo || !storage)) + ? : null} @@ -114,11 +114,11 @@ export const CardFrontside = ({ - {!isScoreHidden && {team1.score}} + {isFutureMatch ? null : !isScoreHidden && {team1.score}} - {!isScoreHidden && {team2.score}} + {isFutureMatch ? null : !isScoreHidden && {team2.score}}