Merged in feat/SW-1355-reward-night-booking-tracking (pull request #1758)
feat: SW-1355 Tracking implementation reward night booking * feat: SW-1355 Tracking implementation reward night booking * feat: SW-1355 Updated checks and optional params * feat: SW-1355 Typings updated * feat: SW-1355 Removed undefined check * feat: SW-1355 optimized code Approved-by: Christian Andolf
This commit is contained in:
@@ -51,12 +51,17 @@ export default function Rooms() {
|
||||
}))
|
||||
)
|
||||
)
|
||||
const lowestPrice = pricesWithCurrencies.reduce(
|
||||
(minPrice, { price }) => Math.min(minPrice, price),
|
||||
Infinity
|
||||
)
|
||||
|
||||
const currency = pricesWithCurrencies[0]?.currency
|
||||
// Specific n/a when no prices available in reward night and voucher scenarios
|
||||
const lowestPrice = pricesWithCurrencies.length
|
||||
? pricesWithCurrencies
|
||||
.reduce((minPrice, { price }) => Math.min(minPrice, price), Infinity)
|
||||
.toString()
|
||||
: "n/a"
|
||||
|
||||
const currency = pricesWithCurrencies.length
|
||||
? pricesWithCurrencies[0]?.currency
|
||||
: "n/a"
|
||||
|
||||
trackLowestRoomPrice({
|
||||
hotelId,
|
||||
|
||||
Reference in New Issue
Block a user