feat: add condition to show strikethrough price

This commit is contained in:
Simon Emanuelsson
2025-06-26 12:25:32 +02:00
committed by Simon.Emanuelsson
parent fb75cdc710
commit 5d275c6b1b

View File

@@ -188,7 +188,13 @@ export default function RateSummary() {
mainRoomCurrency = rateProduct.public.localPrice.currency
}
const showStrikedThroughPrice = bookingCode || isUserLoggedIn
const totalRegularPrice = totalPriceToShow.local?.regularPrice
? totalPriceToShow.local.regularPrice
: 0
const isTotalRegularPriceGreaterThanPrice =
totalRegularPrice > totalPriceToShow.local.price
const showStrikedThroughPrice =
(!!bookingCode || isUserLoggedIn) && isTotalRegularPriceGreaterThanPrice
// attribute data-footer-spacing used to add spacing
// beneath footer to be able to show entire footer upon