feat/SW-763-image-gallery-update (pull request #846)

feat(SW-763): update to smallerImages for select-hotel/rate page and slice size depending on signature

* feat(SW-763): update to smallerImages for select- hotel/rate page and slice size depending on signature

* fix(SW-763): add hotelType enum

* feat(SW-763): move hotel type check to the route for the hotelData

* fix(SW-763): remove unused import

* fix(SW-763): fix comment

* fix(SW-763): add optional galleryImages check


Approved-by: Christian Andolf
Approved-by: Pontus Dreij
Approved-by: Niclas Edenvin
This commit is contained in:
Bianca Widstam
2024-11-13 08:51:51 +00:00
parent 169751c5a6
commit b6c390fdad
5 changed files with 22 additions and 12 deletions

View File

@@ -56,13 +56,10 @@ export default function HotelCard({
onMouseLeave={handleMouseLeave}
>
<section className={styles.imageContainer}>
{hotelData.gallery && (
{hotelData?.galleryImages && (
<ImageGallery
title={hotelData.name}
images={[
hotelData.hotelContent.images,
...hotelData.gallery.heroImages,
]}
images={hotelData.galleryImages}
/>
)}
<div className={styles.tripAdvisor}>

View File

@@ -29,13 +29,10 @@ export default function HotelInfoCard({ hotelData }: HotelInfoCardProps) {
{hotelAttributes && (
<section className={styles.wrapper}>
<div className={styles.imageWrapper}>
{hotelAttributes.gallery && (
{hotelAttributes?.galleryImages && (
<ImageGallery
title={hotelAttributes.name}
images={[
hotelAttributes.hotelContent.images,
...hotelAttributes.gallery.heroImages,
]}
images={hotelAttributes.galleryImages}
/>
)}
{hotelAttributes.ratings?.tripAdvisor && (