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'
type Props = {
live?: boolean,
onSelect?: (selectedMathPlaylist: PlaylistOption) => void,
playlists: MatchPlaylistOptions,
selectedMathPlaylist?: PlaylistOption,
@ -36,6 +37,7 @@ const Item = styled.li`
`
export const MatchPlaylists = ({
live,
onSelect,
playlists,
selectedMathPlaylist,

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

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

Loading…
Cancel
Save