We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 356b8f1 commit 230549dCopy full SHA for 230549d
1 file changed
src/components/blogCarousel/blogCarousel.tsx
@@ -27,9 +27,15 @@ export function BlogCarousel() {
27
setCount(api.scrollSnapList().length);
28
setCurrent(api.selectedScrollSnap() + 1);
29
30
- api.on("select", () => {
+ const onSelect = () => {
31
32
- });
+ };
33
+
34
+ api.on("select", onSelect);
35
36
+ return () => {
37
+ api.off("select", onSelect);
38
39
}, [api]);
40
41
return (
@@ -62,8 +68,9 @@ export function BlogCarousel() {
62
68
}}
63
69
plugins={[
64
70
Autoplay({
65
- delay: 4000,
66
- stopOnInteraction: true,
71
+ delay: 5000,
72
+ stopOnInteraction: false,
73
+ stopOnMouseEnter: true,
67
74
}),
75
]}
76
>
0 commit comments