From 861b9025e1dd319246f393d5cbf3fc3c6100fa92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=B5=D1=80=D0=B3=D0=B5=D0=B9=20=D0=A8=D0=B8=D1=82?= =?UTF-8?q?=D0=B8=D0=BA=D0=BE=D0=B2?= Date: Thu, 6 Oct 2022 10:02:41 +0400 Subject: [PATCH] fix(ott-2790): fixed filter playlist --- .../components/MatchPlaylists/index.tsx | 10 +++++----- .../MatchSidePlaylists/components/PlayButton/index.tsx | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/features/MatchSidePlaylists/components/MatchPlaylists/index.tsx b/src/features/MatchSidePlaylists/components/MatchPlaylists/index.tsx index 5abffedb..e0e49fb9 100644 --- a/src/features/MatchSidePlaylists/components/MatchPlaylists/index.tsx +++ b/src/features/MatchSidePlaylists/components/MatchPlaylists/index.tsx @@ -42,12 +42,12 @@ export const MatchPlaylists = ({ playlists, selectedMathPlaylist, }: Props) => { - // console.log('🚀 ~ file: index.tsx ~ line 45 ~ live', live) - // console.log('🚀 ~ file: index.tsx ~ line 45 ~ playlists', playlists) const filteredPlayListByDuration = useMemo(() => ( - filter(playlists, (playlist) => (live - ? !!playlist.duration || (playlist.id === 'full_game') - : !!playlist.duration)) + filter(playlists, (playlist) => ( + live + ? Boolean(playlist.duration) || (playlist.id === 'full_game') + : Boolean(playlist.duration) + )) ), [playlists, live]) return ( diff --git a/src/features/MatchSidePlaylists/components/PlayButton/index.tsx b/src/features/MatchSidePlaylists/components/PlayButton/index.tsx index 44ce37d9..63aa298c 100644 --- a/src/features/MatchSidePlaylists/components/PlayButton/index.tsx +++ b/src/features/MatchSidePlaylists/components/PlayButton/index.tsx @@ -31,10 +31,10 @@ const Duration = styled(Title)` export const LiveBtn = styled(LiveBtnBase)` margin-left: 10px; - background-color: ${({ isActive }) => (isActive - ? 'transparent' - : '#CC0000') -}; + background-color: ${({ isActive }) => ( + isActive + ? 'transparent' + : '#CC0000')}; ` export const PlayButton = ({