Merged in fix/SW-1715-price-details-with-many-rooms (pull request #1421)
Fix/SW-1715 price details with many rooms * fix: added useMemo to stop combineRoomAvailabilities from rerunning * fix: add max height and scroll to modal content * fix: return new array in combineRoomAvailabilities instead of pushing Approved-by: Christian Andolf
This commit is contained in:
@@ -11,7 +11,13 @@ export function combineRoomAvailabilities(
|
||||
return availabilityResults.reduce<RoomsAvailability | null>((acc, result) => {
|
||||
if (result.status === "fulfilled" && result.value) {
|
||||
if (acc) {
|
||||
acc.roomConfigurations.push(...result.value.roomConfigurations)
|
||||
acc = {
|
||||
...acc,
|
||||
roomConfigurations: [
|
||||
...acc.roomConfigurations,
|
||||
...result.value.roomConfigurations,
|
||||
],
|
||||
}
|
||||
} else {
|
||||
acc = result.value
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user