feat(ott-894): add live (#321)

keep-around/af30b88d367751c9e05a735e4a0467a96238ef47
Zoia 5 years ago committed by GitHub
parent 3b10015c9a
commit 07ba41b100
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/features/MatchCard/hooks.tsx
  2. 9
      src/features/Matches/helpers/prepareMatches.tsx

@ -30,7 +30,7 @@ export const useCard = (match: Match) => {
match.sportType,
])
const openMatchPopup = useCallback(() => {
if (match.isClickable && match.calc && match.hasVideo) {
if (match.isClickable) {
setMatch(match)
openPopup()
fetchMatchPlaylists(match)

@ -21,6 +21,7 @@ const prepareMatch = ({
tournament,
}: Match) => {
const date = new Date(matchDate)
const accessable = sub && access
return {
accessibleBySubscription: sub,
accessibleInUsersCountry: access,
@ -29,10 +30,12 @@ const prepareMatch = ({
formattedDate: format(date, 'dd.MM.yy'),
hasVideo: has_video,
id,
isClickable: (sub && access && (
has_video
isClickable: live
? accessable
: (accessable && calc && (
has_video
|| storage
)),
)),
live,
preview,
sportName: getSportLexic(sport),

Loading…
Cancel
Save