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

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

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

Loading…
Cancel
Save