Files
web/apps/scandic-web/components/HotelReservation/MyStay/Rooms/SingleRoom/Img/index.tsx
Hrishikesh Vaipurkar 36e8ac11d1 Merged in fix/SW-2500-sync-hotel-images-and- (pull request #2569)
fix(SW-2500): Fixed no image gives error on confirmation and booking page

* fix(SW-2500): Fixed no image gives error on confirmation and booking page


Approved-by: Anton Gunnarsson
Approved-by: Matilda Landström
2025-07-28 08:51:43 +00:00

32 lines
619 B
TypeScript

"use client"
import { useMyStayStore } from "@/stores/my-stay"
import Image from "@/components/Image"
import styles from "./img.module.css"
export default function Img() {
const { room, roomName } = useMyStayStore((state) => ({
room: state.bookedRoom.room,
roomName: state.bookedRoom.roomName,
}))
if (!room) {
return null
}
const image = room.images?.[0]
return (
<div className={styles.imageContainer}>
<Image
alt={roomName}
className={styles.image}
height={960}
src={image?.imageSizes.small ?? ""}
width={640}
/>
</div>
)
}