fix(#1701): dont show duration time in playbutton for live match

keep-around/fdb88b04b32b9392e76795099e2ec47c9856b38b
Andrei Dekterev 4 years ago committed by Andrei Dekterev
parent 0d6286e90d
commit 3fd323594e
  1. 2
      src/features/MatchSidePlaylists/components/MatchPlaylists/index.tsx
  2. 4
      src/features/MatchSidePlaylists/components/PlayButton/index.tsx
  3. 1
      src/features/MatchSidePlaylists/components/TabWatch/index.tsx

@ -16,6 +16,7 @@ import { T9n } from 'features/T9n'
import { PlayButton } from '../PlayButton' import { PlayButton } from '../PlayButton'
type Props = { type Props = {
live?: boolean,
onSelect?: (selectedMathPlaylist: PlaylistOption) => void, onSelect?: (selectedMathPlaylist: PlaylistOption) => void,
playlists: MatchPlaylistOptions, playlists: MatchPlaylistOptions,
selectedMathPlaylist?: PlaylistOption, selectedMathPlaylist?: PlaylistOption,
@ -36,6 +37,7 @@ const Item = styled.li`
` `
export const MatchPlaylists = ({ export const MatchPlaylists = ({
live,
onSelect, onSelect,
playlists, playlists,
selectedMathPlaylist, selectedMathPlaylist,

@ -14,6 +14,7 @@ type Props = {
disabled?: boolean, disabled?: boolean,
duration?: number, duration?: number,
leftContent?: ReactNode, leftContent?: ReactNode,
live?: boolean,
onClick: () => void, onClick: () => void,
} }
@ -28,6 +29,7 @@ export const PlayButton = ({
disabled, disabled,
duration, duration,
leftContent, leftContent,
live,
onClick, onClick,
}: Props) => ( }: Props) => (
<Button <Button
@ -39,6 +41,6 @@ export const PlayButton = ({
<Title> <Title>
{children} {children}
</Title> </Title>
{!isUndefined(duration) && <Duration>{secondsToHms(duration)}</Duration>} {!isUndefined(duration) && !live && <Duration>{secondsToHms(duration)}</Duration>}
</Button> </Button>
) )

@ -29,6 +29,7 @@ export const TabWatch = ({
playlists={playlists.match} playlists={playlists.match}
selectedMathPlaylist={selectedPlaylist} selectedMathPlaylist={selectedPlaylist}
onSelect={onSelect} onSelect={onSelect}
live={profile?.live}
/> />
<DropdownSection <DropdownSection
itemsCount={size(playlists.interview)} itemsCount={size(playlists.interview)}

Loading…
Cancel
Save