|
|
|
|
@ -2,6 +2,7 @@ import type { Dispatch, SetStateAction } from 'react' |
|
|
|
|
import { useEffect } from 'react' |
|
|
|
|
|
|
|
|
|
import isEmpty from 'lodash/isEmpty' |
|
|
|
|
import size from 'lodash/size' |
|
|
|
|
|
|
|
|
|
import type { Events } from 'requests' |
|
|
|
|
|
|
|
|
|
@ -52,10 +53,15 @@ export const CircleAnimationBar = ({ |
|
|
|
|
const currentEpisodesPercent = 100 - (100 / (timeOfAllEpisodes / currentAnimationTime)) |
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
|
if (currentEpisodesPercent >= 100) { |
|
|
|
|
if (currentEpisodesPercent >= 100 && (plaingOrder === size(filteredEvents))) { |
|
|
|
|
setWatchAllEpisodesTimer(false) |
|
|
|
|
} |
|
|
|
|
}, [currentEpisodesPercent, setWatchAllEpisodesTimer]) |
|
|
|
|
}, [ |
|
|
|
|
currentEpisodesPercent, |
|
|
|
|
filteredEvents, |
|
|
|
|
plaingOrder, |
|
|
|
|
setWatchAllEpisodesTimer, |
|
|
|
|
]) |
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
<Svg> |
|
|
|
|
|