refactor: url management in hotel reservation flow

This commit is contained in:
Christel Westerberg
2025-01-13 14:26:38 +01:00
parent 23ff0970e9
commit b2935114e3
48 changed files with 407 additions and 418 deletions

View File

@@ -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
),
}