diff --git a/frontend/composables/global/useSlider.ts b/frontend/composables/global/useSlider.ts index 6e11af2..e19d641 100644 --- a/frontend/composables/global/useSlider.ts +++ b/frontend/composables/global/useSlider.ts @@ -63,7 +63,7 @@ const useSlider = ({ duration = 0, count }: Props) => { const restartSliderTimer = () => { if (sliderTimer.value) clearInterval(sliderTimer.value); runProgress(); - + if (duration > 0) { sliderTimer.value = setInterval(() => { runProgress(); @@ -76,7 +76,9 @@ const useSlider = ({ duration = 0, count }: Props) => { restartSliderTimer(); }); - onUnmounted(() => {}); + onUnmounted(() => { + restartSliderTimer(); + }); return { activeSlide,