From 36ae0cbacc3c2454a15bbb0ae40aa35480ad5d5d Mon Sep 17 00:00:00 2001 From: barnilsarma Date: Sat, 2 Nov 2024 19:55:05 +0530 Subject: [PATCH] auto scroll of --- src/Components/Carausel/Carausel.jsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Components/Carausel/Carausel.jsx b/src/Components/Carausel/Carausel.jsx index 1704b43..fd5e1bf 100644 --- a/src/Components/Carausel/Carausel.jsx +++ b/src/Components/Carausel/Carausel.jsx @@ -8,12 +8,12 @@ const Carousel = ({ children }) => { const [active, setActive] = useState(0); const count = React.Children.count(children); - useEffect(() => { - const autoplay = setInterval(() => { - setActive((prevActive) => (prevActive + 1) % count); - }, AUTOPLAY_INTERVAL); - return () => clearInterval(autoplay); - }, [count]); + // useEffect(() => { + // const autoplay = setInterval(() => { + // setActive((prevActive) => (prevActive + 1) % count); + // }, AUTOPLAY_INTERVAL); + // return () => clearInterval(autoplay); + // }, [count]); return (