fix(2275): fix previewURL for amazon streams

keep-around/cceca8287d7b7905b215c9278dceafaa36809222
Andrei Dekterev 4 years ago
parent 99e29d12d8
commit cceca8287d
  1. 33538
      package-lock.json
  2. 9
      src/features/MatchCard/CardFrontside/index.tsx
  3. 2
      src/features/Matches/helpers/prepareMatches.tsx
  4. 1
      src/requests/getMatches/types.tsx

33538
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -12,6 +12,8 @@ import { useName } from 'features/Name'
import { T9n } from 'features/T9n'
import { MatchAccess } from 'features/Matches/helpers/getMatchClickAction'
import { readToken } from 'helpers/token'
import { useUserFavoritesStore } from 'features/UserFavorites/store'
import { NoAccessMessage } from '../NoAccessMessage'
import {
@ -56,6 +58,7 @@ export const CardFrontside = ({
formattedDate,
live,
preview,
previewURL,
sportType,
team1,
team2,
@ -75,6 +78,8 @@ export const CardFrontside = ({
const team1InFavorites = isInFavorites(ProfileTypes.TEAMS, team1.id)
const team2InFavorites = isInFavorites(ProfileTypes.TEAMS, team2.id)
const currentPreviewURL = previewURL ? `${previewURL}?access_token=${readToken()}` : preview
return (
<CardWrapperOuter
onClick={onClick}
@ -84,11 +89,11 @@ export const CardFrontside = ({
<HoverFrame />
<PreviewWrapper>
{
preview && (
(currentPreviewURL) && (
<Preview
alt={tournamentName}
title={tournamentName}
src={preview}
src={currentPreviewURL}
/>
)
}

@ -17,6 +17,7 @@ const prepareMatch = (match: Match) => {
id,
live,
preview,
previewURL,
sport,
storage,
team1,
@ -34,6 +35,7 @@ const prepareMatch = (match: Match) => {
id,
live,
preview,
previewURL,
sportType: sport,
storage,
team1,

@ -24,6 +24,7 @@ export type Match = {
/** наличие hls стрима */
live: boolean,
preview?: string,
previewURL?: string,
sport: SportTypes,
/** наличие завершенного hls стрима */
storage: boolean,

Loading…
Cancel
Save