remove automated carousel
This commit is contained in:
parent
60a5577a6b
commit
4ce242e87e
|
@ -6,7 +6,6 @@ export type Picture = {
|
|||
};
|
||||
|
||||
const Carousel = ({ pictures }: { pictures: Picture[] }) => {
|
||||
const maxScrollWidth = useRef(0);
|
||||
const [currentIndex, setCurrentIndex] = useState(0);
|
||||
const carousel = useRef(null);
|
||||
|
||||
|
@ -47,17 +46,6 @@ const Carousel = ({ pictures }: { pictures: Picture[] }) => {
|
|||
}
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
const int = setInterval(() => {
|
||||
if (currentIndex < pictures.length - 1) {
|
||||
setCurrentIndex((prevState) => prevState + 1);
|
||||
} else {
|
||||
setCurrentIndex(0);
|
||||
}
|
||||
}, 7500);
|
||||
return () => clearInterval(int);
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div className="relative w-full">
|
||||
<div
|
||||
|
|
Loading…
Reference in New Issue
Block a user