From 3fd323594e026ebd9b0541d3e91914c153ceb40e Mon Sep 17 00:00:00 2001 From: Andrei Dekterev Date: Wed, 20 Apr 2022 17:37:52 +0700 Subject: [PATCH] fix(#1701): dont show duration time in playbutton for live match --- .../MatchSidePlaylists/components/MatchPlaylists/index.tsx | 2 ++ .../MatchSidePlaylists/components/PlayButton/index.tsx | 4 +++- src/features/MatchSidePlaylists/components/TabWatch/index.tsx | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/features/MatchSidePlaylists/components/MatchPlaylists/index.tsx b/src/features/MatchSidePlaylists/components/MatchPlaylists/index.tsx index 306d54f7..d7325b6c 100644 --- a/src/features/MatchSidePlaylists/components/MatchPlaylists/index.tsx +++ b/src/features/MatchSidePlaylists/components/MatchPlaylists/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, diff --git a/src/features/MatchSidePlaylists/components/PlayButton/index.tsx b/src/features/MatchSidePlaylists/components/PlayButton/index.tsx index a34374e6..119e1cab 100644 --- a/src/features/MatchSidePlaylists/components/PlayButton/index.tsx +++ b/src/features/MatchSidePlaylists/components/PlayButton/index.tsx @@ -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) => ( ) diff --git a/src/features/MatchSidePlaylists/components/TabWatch/index.tsx b/src/features/MatchSidePlaylists/components/TabWatch/index.tsx index 1831f322..d6b94831 100644 --- a/src/features/MatchSidePlaylists/components/TabWatch/index.tsx +++ b/src/features/MatchSidePlaylists/components/TabWatch/index.tsx @@ -29,6 +29,7 @@ export const TabWatch = ({ playlists={playlists.match} selectedMathPlaylist={selectedPlaylist} onSelect={onSelect} + live={profile?.live} />