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 styles from "./selectedRoomPanel.module.css"
|
||||||
|
|
||||||
import type { RoomParam } from "@/types/components/hotelReservation/selectRate/section"
|
import type {
|
||||||
import type { Rate } from "@/types/components/hotelReservation/selectRate/selectRate"
|
Rate,
|
||||||
|
Room,
|
||||||
|
} from "@/types/components/hotelReservation/selectRate/selectRate"
|
||||||
import type { RoomData } from "@/types/hotel"
|
import type { RoomData } from "@/types/hotel"
|
||||||
|
|
||||||
interface SelectedRoomPanelProps {
|
interface SelectedRoomPanelProps {
|
||||||
roomIndex: number
|
roomIndex: number
|
||||||
room: RoomParam
|
room: Room
|
||||||
selectedRate: Rate | null
|
selectedRate: Rate | null
|
||||||
roomCategories: RoomData[]
|
roomCategories: RoomData[]
|
||||||
handleModify: () => void
|
handleModify: () => void
|
||||||
@@ -35,6 +37,8 @@ export default function SelectedRoomPanel({
|
|||||||
)
|
)
|
||||||
)?.images
|
)?.images
|
||||||
|
|
||||||
|
console.log(room)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.selectedRoomPanel}>
|
<div className={styles.selectedRoomPanel}>
|
||||||
<div>
|
<div>
|
||||||
@@ -52,13 +56,13 @@ export default function SelectedRoomPanel({
|
|||||||
{selectedRate?.roomType},{" "}
|
{selectedRate?.roomType},{" "}
|
||||||
{intl.formatMessage(
|
{intl.formatMessage(
|
||||||
{
|
{
|
||||||
id: room.children?.length
|
id: room.childrenInRoom?.length
|
||||||
? "{adults} adults, {children} children"
|
? "{adults} adults, {children} children"
|
||||||
: "{adults} adults",
|
: "{adults} adults",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
adults: room.adults,
|
adults: room.adults,
|
||||||
children: room.children?.length,
|
children: room.childrenInRoom?.length,
|
||||||
}
|
}
|
||||||
)}
|
)}
|
||||||
</Subtitle>
|
</Subtitle>
|
||||||
|
|||||||
Reference in New Issue
Block a user