import { Fragment } from 'react' import type { Events } from 'requests/getMatchEvents' import type { MatchInfo } from 'requests/getMatchInfo' import { StreamPlayer } from 'features/StreamPlayer' import { YoutubePlayer } from 'features/StreamPlayer/components/YoutubePlayer' import { MatchSidePlaylists } from 'features/MatchSidePlaylists' import { isMobileDevice } from 'config/userAgent' import { Container } from '../../styled' import { useLiveMatch } from './hooks' import { TournamentData } from '../../types' import { MatchProfileCardMobile } from '../MatchProfileCardMobile' type Props = { events: Events, profile: MatchInfo, tournamentData: TournamentData, } export const LiveMatch = ({ events, profile, tournamentData, }: Props) => { const { matchPlaylists, onPlayerProgressChange, onPlayingChange, onPlaylistSelect, resume, selectedPlaylist, streamUrl, } = useLiveMatch(profile) const Player = profile?.youtube_link ? YoutubePlayer : StreamPlayer return ( {isMobileDevice ? : null} ) }