feat(SW-718): Fixed bug where children was not displayd in selected room panel
This commit is contained in:
@@ -9,13 +9,15 @@ import Subtitle from "@/components/TempDesignSystem/Text/Subtitle"
|
||||
|
||||
import styles from "./selectedRoomPanel.module.css"
|
||||
|
||||
import type { RoomParam } from "@/types/components/hotelReservation/selectRate/section"
|
||||
import type { Rate } from "@/types/components/hotelReservation/selectRate/selectRate"
|
||||
import type {
|
||||
Rate,
|
||||
Room,
|
||||
} from "@/types/components/hotelReservation/selectRate/selectRate"
|
||||
import type { RoomData } from "@/types/hotel"
|
||||
|
||||
interface SelectedRoomPanelProps {
|
||||
roomIndex: number
|
||||
room: RoomParam
|
||||
room: Room
|
||||
selectedRate: Rate | null
|
||||
roomCategories: RoomData[]
|
||||
handleModify: () => void
|
||||
@@ -35,6 +37,8 @@ export default function SelectedRoomPanel({
|
||||
)
|
||||
)?.images
|
||||
|
||||
console.log(room)
|
||||
|
||||
return (
|
||||
<div className={styles.selectedRoomPanel}>
|
||||
<div>
|
||||
@@ -52,13 +56,13 @@ export default function SelectedRoomPanel({
|
||||
{selectedRate?.roomType},{" "}
|
||||
{intl.formatMessage(
|
||||
{
|
||||
id: room.children?.length
|
||||
id: room.childrenInRoom?.length
|
||||
? "{adults} adults, {children} children"
|
||||
: "{adults} adults",
|
||||
},
|
||||
{
|
||||
adults: room.adults,
|
||||
children: room.children?.length,
|
||||
children: room.childrenInRoom?.length,
|
||||
}
|
||||
)}
|
||||
</Subtitle>
|
||||
|
||||
Reference in New Issue
Block a user