From f9702c9d2f1a8b27ce92826239ea77b643e970b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=98=D0=B2=D0=B0=D0=BD=20=D0=9F=D0=B8=D0=BC=D0=B8=D0=BD?= =?UTF-8?q?=D0=BE=D0=B2?= <61900450+ivan-piminov@users.noreply.github.com> Date: Thu, 28 Jan 2021 17:47:32 +0300 Subject: [PATCH] Ott 754 fix score popup (#280) * fix(finishedplaylistpage): hide/show score match * fix(finishedplaylistpage): add '-' between teams if score hidden * refactor(finishedplaylistpage component): refactoring code Co-authored-by: Ivan Piminov --- .../MatchPopup/components/FinishedPlaylistPage/index.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/features/MatchPopup/components/FinishedPlaylistPage/index.tsx b/src/features/MatchPopup/components/FinishedPlaylistPage/index.tsx index 295e7e98..c41f685e 100644 --- a/src/features/MatchPopup/components/FinishedPlaylistPage/index.tsx +++ b/src/features/MatchPopup/components/FinishedPlaylistPage/index.tsx @@ -2,6 +2,7 @@ import { Fragment } from 'react' import isEmpty from 'lodash/isEmpty' +import { useMatchSwitchesStore } from 'features/MatchSwitches' import { Name } from 'features/Name' import { MediaQuery } from 'features/MediaQuery' import { useMatchPopupStore } from 'features/MatchPopup' @@ -21,6 +22,8 @@ import { export const FinishedPlaylistPage = () => { const { match, matchPlaylists } = useMatchPopupStore() + const { isScoreHidden } = useMatchSwitchesStore() + if (!match) return null const { team1, team2 } = match @@ -40,7 +43,7 @@ export const FinishedPlaylistPage = () => { - {score} + {isScoreHidden ? ' - ' : score}