refactor(SW-337): conditional rendering of image titles
This commit is contained in:
@@ -56,7 +56,7 @@ export default function FullView({
|
||||
/>
|
||||
|
||||
<div className={styles.fullViewFooter}>
|
||||
<Body color="white">{image.title}</Body>
|
||||
{image.title && <Body color="white">{image.title}</Body>}
|
||||
</div>
|
||||
</motion.div>
|
||||
</AnimatePresence>
|
||||
|
||||
@@ -58,7 +58,9 @@ export default function Gallery({
|
||||
<div className={styles.galleryHeader}>
|
||||
<DialogTitle asChild>
|
||||
<div className={styles.imageCaption}>
|
||||
<Caption color="textMediumContrast">{mainImage.title}</Caption>
|
||||
{mainImage.title && (
|
||||
<Caption color="textMediumContrast">{mainImage.title}</Caption>
|
||||
)}
|
||||
</div>
|
||||
</DialogTitle>
|
||||
</div>
|
||||
|
||||
@@ -15,8 +15,8 @@ export function extractHotelImages(hotelData: Hotel): ImageItem[] {
|
||||
}
|
||||
|
||||
if (hotelData.healthFacilities) {
|
||||
hotelData.healthFacilities.forEach((facility: any) => {
|
||||
facility.content.images.forEach((image: any) => {
|
||||
hotelData.healthFacilities.forEach((facility) => {
|
||||
facility.content.images.forEach((image) => {
|
||||
images.push({
|
||||
url: image.imageSizes.large,
|
||||
alt: image.metaData.altText,
|
||||
|
||||
Reference in New Issue
Block a user