fix(1580): player logic change (#462)

keep-around/af30b88d367751c9e05a735e4a0467a96238ef47
Mirlan 4 years ago committed by GitHub
parent 20ac46d57c
commit 88cdcb9d58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      src/features/MatchPage/index.tsx
  2. 1
      src/requests/getMatchInfo.tsx

@ -16,7 +16,8 @@ import { Wrapper } from './styled'
const MatchPage = () => {
usePageLogger()
const profile = useMatchProfile()
const hasVideo = profile?.has_video
const playFromScout = profile?.has_video && !profile.live
const playFromOTT = !profile?.has_video && (profile?.live || profile?.storage)
return (
<PageWrapper>
@ -26,8 +27,8 @@ const MatchPage = () => {
<Main>
<UserFavorites />
<Wrapper>
{(!hasVideo && profile) && <LiveMatch />}
{(hasVideo && profile) && <FinishedMatch profile={profile} />}
{playFromOTT && <LiveMatch />}
{playFromScout && <FinishedMatch profile={profile} />}
</Wrapper>
</Main>
</PageWrapper>

@ -21,6 +21,7 @@ export type MatchInfo = {
date: string,
has_video: boolean,
live: boolean,
storage: boolean,
team1: Team,
team2: Team,
tournament: {

Loading…
Cancel
Save