import { useState } from "react"; import { sculptureList } from "./data.js"; const Gallery = () => { const [index, setIndex] = useState(0); const handleClick = () => { // index = index + 1; setIndex(index + 1); }; let sculpture = sculptureList[index]; return (

{sculpture.name} by {sculpture.description}{" "}

{index + 1} of {sculptureList.length}

{sculpture.alt}

{sculpture.description}

); }; export default Gallery;