fix: rename children to childrenInRoom

This commit is contained in:
Christel Westerberg
2025-01-14 12:25:17 +01:00
parent b2935114e3
commit bcae63e3fc
26 changed files with 104 additions and 91 deletions

View File

@@ -29,7 +29,7 @@ export default function GuestsRoomsPickerForm() {
const [isOpen, setIsOpen] = useState(false)
const [containerHeight, setContainerHeight] = useState(0)
const childCount =
rooms[0] && rooms[0].children ? rooms[0].children.length : 0 // ToDo Update for multiroom later
rooms[0] && rooms[0].childrenInRoom ? rooms[0].childrenInRoom.length : 0 // ToDo Update for multiroom later
const htmlElement =
typeof window !== "undefined" ? document.querySelector("body") : null
@@ -154,7 +154,7 @@ function Trigger({
)
)
if (rooms.some((room) => room.children.length > 0)) {
if (rooms.some((room) => room.childrenInRoom.length > 0)) {
parts.push(
intl.formatMessage(
{
@@ -162,7 +162,7 @@ function Trigger({
},
{
totalChildren: rooms.reduce(
(acc, room) => acc + room.children.length,
(acc, room) => acc + room.childrenInRoom.length,
0
),
}