Merged in feat/SW-1521-image-gallery-lightbox (pull request #1226)
Feat/SW-1521 image gallery lightbox * feat(SW-1453): added city listing component * feat(SW-1521): added more generic types to ImageGallery and Lightbox components * feat(SW-1521): added lightbox functionality for top images * feat(SW-1521): added support for setting activeIndex on open inside Lightbox Approved-by: Fredrik Thorsson Approved-by: Chuma Mcphoy (We Ahead)
This commit is contained in:
@@ -28,6 +28,8 @@ function ImageGallery({
|
||||
return <div className={styles.imagePlaceholder} />
|
||||
}
|
||||
|
||||
const firstImage = images[0]
|
||||
|
||||
return (
|
||||
<>
|
||||
<div
|
||||
@@ -38,8 +40,8 @@ function ImageGallery({
|
||||
>
|
||||
<Image
|
||||
className={styles.image}
|
||||
src={images[0].imageSizes.medium}
|
||||
alt={images[0].metaData.altText}
|
||||
src={firstImage.src}
|
||||
alt={firstImage.alt}
|
||||
onError={() => setImageError(true)}
|
||||
{...imageProps}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user