refactor: url management in hotel reservation flow
This commit is contained in:
@@ -28,7 +28,8 @@ export default function GuestsRoomsPickerForm() {
|
||||
const [isDesktop, setIsDesktop] = useState(true)
|
||||
const [isOpen, setIsOpen] = useState(false)
|
||||
const [containerHeight, setContainerHeight] = useState(0)
|
||||
const childCount = rooms[0] ? rooms[0].child.length : 0 // ToDo Update for multiroom later
|
||||
const childCount =
|
||||
rooms[0] && rooms[0].children ? rooms[0].children.length : 0 // ToDo Update for multiroom later
|
||||
|
||||
const htmlElement =
|
||||
typeof window !== "undefined" ? document.querySelector("body") : null
|
||||
@@ -153,7 +154,7 @@ function Trigger({
|
||||
)
|
||||
)
|
||||
|
||||
if (rooms.some((room) => room.child.length > 0)) {
|
||||
if (rooms.some((room) => room.children.length > 0)) {
|
||||
parts.push(
|
||||
intl.formatMessage(
|
||||
{
|
||||
@@ -161,7 +162,7 @@ function Trigger({
|
||||
},
|
||||
{
|
||||
totalChildren: rooms.reduce(
|
||||
(acc, room) => acc + room.child.length,
|
||||
(acc, room) => acc + room.children.length,
|
||||
0
|
||||
),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user