Merged in fix/SW-1955-image-gallery-hide-room-label (pull request #1621)

fix(SW-1955): hide label on room sidepeek

* fix(SW-1955): hide label on room sidepeek


Approved-by: Erik Tiekstra
This commit is contained in:
Fredrik Thorsson
2025-03-25 18:43:51 +00:00
parent c29d3c2f93
commit 10040dd424
7 changed files with 16 additions and 2 deletions

View File

@@ -21,6 +21,7 @@ export default function FullView({
onPrev,
currentIndex,
totalImages,
hideLabel,
}: FullViewProps) {
const [animateLeft, setAnimateLeft] = useState(true)
@@ -97,7 +98,9 @@ export default function FullView({
/>
<div className={styles.fullViewFooter}>
{image.caption && <Body color="white">{image.caption}</Body>}
{image.caption && !hideLabel && (
<Body color="white">{image.caption}</Body>
)}
</div>
</motion.div>
</AnimatePresence>

View File

@@ -20,6 +20,7 @@ export default function Gallery({
onSelectImage,
onImageClick,
selectedImage,
hideLabel,
}: GalleryProps) {
const intl = useIntl()
const [animateLeft, setAnimateLeft] = useState(true)
@@ -79,7 +80,7 @@ export default function Gallery({
{/* Desktop Gallery */}
<div className={styles.desktopGallery}>
<div className={styles.galleryHeader}>
{mainImage.caption && (
{mainImage.caption && !hideLabel && (
<div className={styles.imageCaption}>
<Caption color="textMediumContrast">{mainImage.caption}</Caption>
</div>

View File

@@ -16,6 +16,7 @@ export default function Lightbox({
onClose,
isOpen,
activeIndex = 0,
hideLabel,
}: LightboxProps) {
const [selectedImageIndex, setSelectedImageIndex] = useState(activeIndex)
const [isFullView, setIsFullView] = useState(false)
@@ -73,6 +74,7 @@ export default function Lightbox({
onPrev={handlePrev}
currentIndex={selectedImageIndex}
totalImages={images.length}
hideLabel={hideLabel}
/>
) : (
<Gallery
@@ -85,6 +87,7 @@ export default function Lightbox({
}}
onImageClick={() => setIsFullView(true)}
selectedImage={images[selectedImageIndex]}
hideLabel={hideLabel}
/>
)}
</motion.div>