remove automated carousel

This commit is contained in:
Jack Merrill 2023-11-01 14:15:58 -04:00
parent 60a5577a6b
commit 4ce242e87e
No known key found for this signature in database

View File

@ -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