feat(ott-2852): add new condition for hide circle

keep-around/61a2661a1c7b0f958a65795b5393822fb1d16524
karela 3 years ago
parent dfd0d71b3b
commit 07b050b45c
  1. 10
      src/features/CircleAnimationBar/index.tsx

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

Loading…
Cancel
Save