fix(fix-show-matches): fix filtered matches

pull/67/head
Andrei Dekterev 3 years ago
parent e8dac0541d
commit f2c12bed8c
  1. 9
      src/features/MatchesGrid/index.tsx

@ -41,9 +41,16 @@ export const MatchesGrid = memo(({ matches }: MatchesGridProps) => {
|| selectedLeague[0] === 'all_competitions')))
}
return matches.filter((match) => compareSport(match, selectedSport))
if (isHomePage && selectedSport) {
return matches.filter((match) => compareSport(match, selectedSport))
}
return matches
}
useEffect(() => {
if (!isHomePage) return
updateSportIds(matches)
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [selectedDate, matches])

Loading…
Cancel
Save