Fix image gallery to display all pictures correctly
Update the image gallery component to use a unique key for each image, preventing errors caused by duplicate file names from different folders. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 517dfa7b-26ac-463d-a6e1-a58c6df97188 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: 53625d0b-481d-4374-b757-211036eafc4b Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/f209e72a-0939-48fa-84fc-57854de71967/517dfa7b-26ac-463d-a6e1-a58c6df97188/ls5p9ni Replit-Helium-Checkpoint-Created: true
This commit is contained in:
parent
86e3c79dde
commit
80116e06ea
@ -237,7 +237,7 @@ export default function GalleryPage() {
|
||||
<div className="grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-3">
|
||||
{images.map((img, i) => (
|
||||
<button
|
||||
key={img.fileName}
|
||||
key={`${img.folder}-${img.fileName}`}
|
||||
onClick={() => setLightboxIndex(i)}
|
||||
className="group relative aspect-square rounded-lg overflow-hidden bg-card border border-card-border cursor-pointer"
|
||||
data-testid={`button-gallery-image-${i}`}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user