mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-06-21 22:31:46 +00:00
Merge pull request #699 from mauriceboe/fix/journey-gallery-lightbox-grouping
fix(journey): gallery lightbox navigates all photos, not just same-day entry
This commit is contained in:
@@ -908,11 +908,11 @@ function GalleryView({ entries, journeyId, userId, trips, onPhotoClick, onRefres
|
|||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<div className="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-1.5 pb-24 md:pb-6">
|
<div className="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-1.5 pb-24 md:pb-6">
|
||||||
{allPhotos.map(({ photo, entry }) => (
|
{allPhotos.map(({ photo, entry }, i) => (
|
||||||
<div
|
<div
|
||||||
key={photo.id}
|
key={photo.id}
|
||||||
className="relative aspect-square rounded-lg overflow-hidden cursor-pointer group"
|
className="relative aspect-square rounded-lg overflow-hidden cursor-pointer group"
|
||||||
onClick={() => onPhotoClick(entry.photos, entry.photos.indexOf(photo))}
|
onClick={() => onPhotoClick(allPhotos.map(a => a.photo), i)}
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
src={photoUrl(photo, 'thumbnail')}
|
src={photoUrl(photo, 'thumbnail')}
|
||||||
|
|||||||
Reference in New Issue
Block a user