fix(#2684): fix show bttn full game in matchpage

keep-around/31934c87741a585cc6b3c9552489ffa62de670b6
Andrei Dekterev 3 years ago
parent 8e3dc9cd41
commit 34b261a4cb
  1. 6
      src/features/MatchPopup/store/hooks/index.tsx
  2. 2
      src/features/SportsFilter/components/SelectSportPopup/styled.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<MatchData>(null)
const { profile } = useMatchPage()
const [matchPlaylists, setMatchPlaylists] = useState<Playlists>(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

@ -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);

Loading…
Cancel
Save