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 { PlayerPlaylistFormats } from '../../types'
import { usePlayerClickHandler } from './usePlayerClickHandler' import { usePlayerClickHandler } from './usePlayerClickHandler'
import { usePlaylistLexics } from './usePlaylistLexics' import { usePlaylistLexics } from './usePlaylistLexics'
import { calculateDuration } from '../../../MatchPage/helpers/fullMatchDuration'
import { useMatchPage } from '../../../MatchPage/store/hooks'
type ArgsFetchMatchPlaylists = { type ArgsFetchMatchPlaylists = {
id: number, id: number,
@ -35,6 +37,7 @@ const initialPlaylists = buildPlaylists(null)
export const useMatchPopup = () => { export const useMatchPopup = () => {
const { pathname } = useLocation() const { pathname } = useLocation()
const [match, setMatch] = useState<MatchData>(null) const [match, setMatch] = useState<MatchData>(null)
const { profile } = useMatchPage()
const [matchPlaylists, setMatchPlaylists] = useState<Playlists>(initialPlaylists) const [matchPlaylists, setMatchPlaylists] = useState<Playlists>(initialPlaylists)
const { const {
@ -93,6 +96,7 @@ export const useMatchPopup = () => {
withFullMatchDuration = true, withFullMatchDuration = true,
}: ArgsFetchMatchPlaylists) => { }: ArgsFetchMatchPlaylists) => {
getMatchPlaylists({ getMatchPlaylists({
fullMatchDuration: calculateDuration(profile),
matchId: id, matchId: id,
selectedActions: [], selectedActions: [],
sportType, sportType,
@ -100,7 +104,7 @@ export const useMatchPopup = () => {
}).then(fetchLexics) }).then(fetchLexics)
.then(buildPlaylists) .then(buildPlaylists)
.then(setMatchPlaylists) .then(setMatchPlaylists)
}, [fetchLexics]) }, [fetchLexics, profile])
const openMatchPopup = (selectedMatch: MatchData) => { const openMatchPopup = (selectedMatch: MatchData) => {
if (!selectedMatch) return if (!selectedMatch) return

@ -161,7 +161,7 @@ export const ScModal = styled(BaseModal)`
${ModalCloseButton} { ${ModalCloseButton} {
font-size: 0; font-size: 0;
padding: 17px 19px; //padding: 17px 19px;
:hover { :hover {
background-color: rgba(255, 255, 255, 0.22); background-color: rgba(255, 255, 255, 0.22);

Loading…
Cancel
Save