mirror of
https://github.com/documenso/documenso.git
synced 2025-11-14 16:51:38 +10:00
fix: reset autoplay timer when you manually click on a new slide
This commit is contained in:
@ -80,6 +80,13 @@ export const Carousel = () => {
|
||||
emblaThumbsApi.scrollTo(emblaApi.selectedScrollSnap());
|
||||
|
||||
resetProgress();
|
||||
const autoplay = emblaApi.plugins()?.autoplay;
|
||||
|
||||
console.log(autoplay);
|
||||
|
||||
if (autoplay) {
|
||||
autoplay.reset();
|
||||
}
|
||||
}, [emblaApi, emblaThumbsApi, setSelectedIndex]);
|
||||
|
||||
const resetProgress = useCallback(() => {
|
||||
|
||||
Reference in New Issue
Block a user