You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
spa_instat_tv/src/features/MatchPage/index.tsx

29 lines
881 B

import { ProfileHeader } from 'features/ProfileHeader'
import { MainWrapper } from 'features/MainWrapper'
import { UserFavorites } from 'features/UserFavorites'
import { MediaQuery } from 'features/MediaQuery'
import { FinishedMatch } from './components/FinishedMatch'
import { LiveMatch } from './components/LiveMatch'
import { useMatchProfile } from './hooks/useMatchProfile'
import { Wrapper } from './styled'
const MatchPage = () => {
const profile = useMatchProfile()
const isLiveMatch = !profile?.calc
return (
<MainWrapper>
<MediaQuery minDevice='laptop'>
<UserFavorites />
</MediaQuery>
<ProfileHeader />
<Wrapper>
{(isLiveMatch && profile) && <LiveMatch profile={profile} />}
{(!isLiveMatch && profile) && <FinishedMatch profile={profile} />}
</Wrapper>
</MainWrapper>
)
}
export default MatchPage