diff --git a/src/features/StreamPlayer/hooks/index.tsx b/src/features/StreamPlayer/hooks/index.tsx index da9752e2..b70c5f4a 100644 --- a/src/features/StreamPlayer/hooks/index.tsx +++ b/src/features/StreamPlayer/hooks/index.tsx @@ -629,7 +629,7 @@ export const useVideoPlayer = ({ // ведем статистику просмотра матча const { start: startCollectingStats, stop: stopCollectingStats } = useInterval({ - callback: () => { + callback: useCallback(() => { if (timeForStatistics.current !== 0) { saveMatchStats({ matchId: profileId, @@ -637,7 +637,7 @@ export const useVideoPlayer = ({ sportType, }) } - }, + }, [profileId, sportType]), intervalDuration: VIEW_INTERVAL_MS, startImmediate: false, })