import { useState, useEffect } from "react"; type Props = { images: string[]; title: string; expansionHandler: (height: number) => void; }; export default function SimpleGallery({ images, title, expansionHandler }: Props) { const [active, setActive] = useState(0); const [enlarged, setEnlarged] = useState(false); let timerRef: any | null = null; if (images.length === 0) return null; function galleryImage(src: string, alt: string) { return (