feat: use correct description for beds in sidepeek
This commit is contained in:
committed by
Simon.Emanuelsson
parent
38f937f948
commit
07a764211f
@@ -1,6 +1,6 @@
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||
import { BED_TYPE_ICONS, type BedTypes } from "@/constants/booking"
|
||||
|
||||
import ImageGallery from "@/components/ImageGallery"
|
||||
import Body from "@/components/TempDesignSystem/Text/Body"
|
||||
@@ -8,7 +8,6 @@ import Caption from "@/components/TempDesignSystem/Text/Caption"
|
||||
import Subtitle from "@/components/TempDesignSystem/Text/Subtitle"
|
||||
import { mapApiImagesToGalleryImages } from "@/utils/imageGallery"
|
||||
|
||||
import { getBedIconName } from "../bedIcon"
|
||||
import { FacilityIcon } from "../facilityIcon"
|
||||
|
||||
import styles from "./roomSidePeekContent.module.css"
|
||||
@@ -121,12 +120,19 @@ export function RoomSidePeekContent({ room }: RoomSidePeekContentProps) {
|
||||
</Body>
|
||||
<ul className={styles.bedOptions}>
|
||||
{room.roomTypes.map((roomType) => {
|
||||
const bedIcon = getBedIconName(roomType.mainBed.type)
|
||||
const description =
|
||||
roomType.description || roomType.mainBed.description
|
||||
const MainBedIcon =
|
||||
BED_TYPE_ICONS[roomType.mainBed.type as BedTypes]
|
||||
const ExtraBedIcon = roomType.fixedExtraBed
|
||||
? BED_TYPE_ICONS[roomType.fixedExtraBed.type as BedTypes]
|
||||
: null
|
||||
return (
|
||||
<li key={roomType.code}>
|
||||
<MaterialIcon icon={bedIcon} color="Icon/Feedback/Neutral" />
|
||||
{MainBedIcon ? <MainBedIcon height={24} width={24} /> : null}
|
||||
{ExtraBedIcon ? <ExtraBedIcon height={24} width={30} /> : null}
|
||||
<Body color="uiTextMediumContrast" asChild>
|
||||
<span>{roomType.mainBed.description}</span>
|
||||
<span>{description}</span>
|
||||
</Body>
|
||||
</li>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user