Merged in fix/SW-2831-image-gallery-history (pull request #2155)
fix(SW-2831): checking isOpen before rendering Lightbox component to avoid spamming the window history * fix(SW-2831): checking isOpen before rendering Lightbox component to avoid spamming the window history Approved-by: Linus Flood
This commit is contained in:
committed by
Linus Flood
parent
f4ef5a342f
commit
f60d07fd9e
@@ -58,13 +58,14 @@ function ImageGallery({
|
||||
})}
|
||||
/>
|
||||
</div>
|
||||
<Lightbox
|
||||
images={images}
|
||||
dialogTitle={title}
|
||||
isOpen={isOpen}
|
||||
onClose={() => setIsOpen(false)}
|
||||
hideLabel={hideLabel}
|
||||
/>
|
||||
{isOpen ? (
|
||||
<Lightbox
|
||||
images={images}
|
||||
dialogTitle={title}
|
||||
onClose={() => setIsOpen(false)}
|
||||
hideLabel={hideLabel}
|
||||
/>
|
||||
) : null}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user