From 34b261a4cb44e56e6ff4237b754df38b109130ad Mon Sep 17 00:00:00 2001 From: Andrei Dekterev Date: Mon, 15 Aug 2022 14:51:21 +0400 Subject: [PATCH] fix(#2684): fix show bttn full game in matchpage --- src/features/MatchPopup/store/hooks/index.tsx | 6 +++++- .../SportsFilter/components/SelectSportPopup/styled.tsx | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/features/MatchPopup/store/hooks/index.tsx b/src/features/MatchPopup/store/hooks/index.tsx index c37262bb..28d41021 100644 --- a/src/features/MatchPopup/store/hooks/index.tsx +++ b/src/features/MatchPopup/store/hooks/index.tsx @@ -23,6 +23,8 @@ import type { MatchData } from '../../types' import { PlayerPlaylistFormats } from '../../types' import { usePlayerClickHandler } from './usePlayerClickHandler' import { usePlaylistLexics } from './usePlaylistLexics' +import { calculateDuration } from '../../../MatchPage/helpers/fullMatchDuration' +import { useMatchPage } from '../../../MatchPage/store/hooks' type ArgsFetchMatchPlaylists = { id: number, @@ -35,6 +37,7 @@ const initialPlaylists = buildPlaylists(null) export const useMatchPopup = () => { const { pathname } = useLocation() const [match, setMatch] = useState(null) + const { profile } = useMatchPage() const [matchPlaylists, setMatchPlaylists] = useState(initialPlaylists) const { @@ -93,6 +96,7 @@ export const useMatchPopup = () => { withFullMatchDuration = true, }: ArgsFetchMatchPlaylists) => { getMatchPlaylists({ + fullMatchDuration: calculateDuration(profile), matchId: id, selectedActions: [], sportType, @@ -100,7 +104,7 @@ export const useMatchPopup = () => { }).then(fetchLexics) .then(buildPlaylists) .then(setMatchPlaylists) - }, [fetchLexics]) + }, [fetchLexics, profile]) const openMatchPopup = (selectedMatch: MatchData) => { if (!selectedMatch) return diff --git a/src/features/SportsFilter/components/SelectSportPopup/styled.tsx b/src/features/SportsFilter/components/SelectSportPopup/styled.tsx index cb457ace..a63fc57c 100644 --- a/src/features/SportsFilter/components/SelectSportPopup/styled.tsx +++ b/src/features/SportsFilter/components/SelectSportPopup/styled.tsx @@ -161,7 +161,7 @@ export const ScModal = styled(BaseModal)` ${ModalCloseButton} { font-size: 0; - padding: 17px 19px; + //padding: 17px 19px; :hover { background-color: rgba(255, 255, 255, 0.22);