Drive-by lightbox refactors (#1659)

* Remove dead code from lightbox

* Rename imageIndex prop to initialImageIndex

* Rename currentImageIndex to imageIndex
This commit is contained in:
dan 2023-10-10 19:07:21 +01:00 committed by GitHub
parent bc2c44cb98
commit d47ff542da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 40 deletions

View file

@ -26,7 +26,7 @@ export const Lightbox = observer(function Lightbox() {
return (
<ImageView
images={[{uri: opts.profileView.avatar || ''}]}
imageIndex={0}
initialImageIndex={0}
visible
onRequestClose={onClose}
FooterComponent={LightboxFooter}
@ -37,7 +37,7 @@ export const Lightbox = observer(function Lightbox() {
return (
<ImageView
images={opts.images.map(img => ({...img}))}
imageIndex={opts.index}
initialImageIndex={opts.index}
visible
onRequestClose={onClose}
FooterComponent={LightboxFooter}