|
|
|
@ -11,6 +11,7 @@ export enum MatchAccess { |
|
|
|
export const getMatchAccess = ({ |
|
|
|
export const getMatchAccess = ({ |
|
|
|
access, |
|
|
|
access, |
|
|
|
calc, |
|
|
|
calc, |
|
|
|
|
|
|
|
date, |
|
|
|
has_video, |
|
|
|
has_video, |
|
|
|
live, |
|
|
|
live, |
|
|
|
storage, |
|
|
|
storage, |
|
|
|
@ -21,7 +22,8 @@ export const getMatchAccess = ({ |
|
|
|
return MatchAccess.CanBuyMatch |
|
|
|
return MatchAccess.CanBuyMatch |
|
|
|
case !access: |
|
|
|
case !access: |
|
|
|
return MatchAccess.NoCountryAccess |
|
|
|
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 |
|
|
|
return MatchAccess.RedirectToProfile |
|
|
|
case live: |
|
|
|
case live: |
|
|
|
return MatchAccess.ViewMatchPopup |
|
|
|
return MatchAccess.ViewMatchPopup |
|
|
|
|