fix(ui): open gallery lightbox immediately

This commit is contained in:
paddy 2026-06-12 00:31:26 +02:00
parent c8f0f6f9dd
commit 6dec905eab

View File

@ -273,14 +273,13 @@ const AlbumDetails = (props) => {
const openGallery = () => {
if (imageError) return
setImages([])
setPhotoIndex(0)
handleOpenLightbox()
dataProvider
.getAlbumImages(record.id)
.then(({ data }) => setImages(Array.isArray(data) ? data : []))
.catch(() => setImages([]))
.finally(() => {
setPhotoIndex(0)
handleOpenLightbox()
})
}
const closeGallery = () => {