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 = () => { const MatchPage = () => {
usePageLogger() usePageLogger()
const profile = useMatchProfile() 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 ( return (
<PageWrapper> <PageWrapper>
@ -26,8 +27,8 @@ const MatchPage = () => {
<Main> <Main>
<UserFavorites /> <UserFavorites />
<Wrapper> <Wrapper>
{(!hasVideo && profile) && <LiveMatch />} {playFromOTT && <LiveMatch />}
{(hasVideo && profile) && <FinishedMatch profile={profile} />} {playFromScout && <FinishedMatch profile={profile} />}
</Wrapper> </Wrapper>
</Main> </Main>
</PageWrapper> </PageWrapper>

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

Loading…
Cancel
Save