From 7e93d59842c2ceb8fda2355bfae605f9361e6742 Mon Sep 17 00:00:00 2001 From: Fredrik Thorsson Date: Mon, 2 Dec 2024 20:38:49 +0100 Subject: [PATCH] feat(SW-936): add secondary image --- .../MeetingsAndConferences/index.tsx | 51 +++++++++++-------- .../meetingsAndConferences.module.css | 6 +++ 2 files changed, 37 insertions(+), 20 deletions(-) diff --git a/components/ContentType/HotelPage/SidePeeks/MeetingsAndConferences/index.tsx b/components/ContentType/HotelPage/SidePeeks/MeetingsAndConferences/index.tsx index 21ca2b336..ed9a96f18 100644 --- a/components/ContentType/HotelPage/SidePeeks/MeetingsAndConferences/index.tsx +++ b/components/ContentType/HotelPage/SidePeeks/MeetingsAndConferences/index.tsx @@ -21,9 +21,15 @@ export default async function MeetingsAndConferencesSidePeek({ }: MeetingsAndConferencesSidePeekProps) { const lang = getLang() const intl = await getIntl() - const mainImage = meetingFacilities?.heroImages[0].imageSizes.medium - const altText = - meetingFacilities?.heroImages[0].metaData.altText || + + const primaryImage = meetingFacilities?.heroImages[0]?.imageSizes.medium + const primaryAltText = + meetingFacilities?.heroImages[0]?.metaData.altText || + intl.formatMessage({ id: "Creative spaces for meetings" }) + + const secondaryImage = meetingFacilities?.heroImages[1]?.imageSizes.medium + const secondaryAltText = + meetingFacilities?.heroImages[1]?.metaData.altText || intl.formatMessage({ id: "Creative spaces for meetings" }) return ( @@ -37,24 +43,29 @@ export default async function MeetingsAndConferencesSidePeek({ {intl.formatMessage({ id: "Creative spaces for meetings" })} - {mainImage && ( - {altText} + {primaryImage && ( +
+ {primaryAltText} + {secondaryImage && ( + {secondaryAltText} + )} +
+ )} + {descriptions?.medium && ( + {descriptions.medium} )} - {descriptions.medium} -
- - [Min to Max capacity square meter info] - - - [Min to Max capacity persons info] - -
{link && (