From 3f12577e1e16ab7efcdbf4b86f588f640379d32a Mon Sep 17 00:00:00 2001 From: Andrei Dekterev Date: Mon, 25 Apr 2022 21:34:02 +0700 Subject: [PATCH] fix(#2388): change check start match on click --- src/features/Matches/helpers/getMatchClickAction/index.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/features/Matches/helpers/getMatchClickAction/index.tsx b/src/features/Matches/helpers/getMatchClickAction/index.tsx index 2cc9e4c1..57cd71ba 100644 --- a/src/features/Matches/helpers/getMatchClickAction/index.tsx +++ b/src/features/Matches/helpers/getMatchClickAction/index.tsx @@ -11,6 +11,7 @@ export enum MatchAccess { export const getMatchAccess = ({ access, calc, + date, has_video, live, storage, @@ -21,7 +22,8 @@ export const getMatchAccess = ({ return MatchAccess.CanBuyMatch case !access: return MatchAccess.NoCountryAccess - case calc || has_video || storage: + // проверка времени матча - 10минут + case ((new Date(Date.parse(date.toString()) - 10 * 60 * 1000) < new Date()) && !live): return MatchAccess.RedirectToProfile case live: return MatchAccess.ViewMatchPopup