import React, { useState } from "react"; function GalleryApp() { const [photos, setPhotos] = useState([ { id: 1, url: "https://picsum.photos/400/300?random=7", title: "Paisagem 1" }, /*{url da fotos },*/ /*{url da fotos },*/ /*{url da fotos },*/ /*{url da fotos },*/ /*{url da fotos },*/ ]); const [selectedPhoto, setSelectedPhoto] = useState(null); return (

Galeria de Fotos

{/* Grade de fotos */}
{photos.map((photo) => (
setSelectedPhoto(photo)}> {photo.title}
{photo.title}
))}
{/* Modal de visualização */} {selectedPhoto && (
setSelectedPhoto(null)} >
e.stopPropagation()} > {selectedPhoto.title}
{selectedPhoto.title}
)}
); } export default GalleryApp;