feat: add condition to show strikethrough price
This commit is contained in:
committed by
Simon.Emanuelsson
parent
fb75cdc710
commit
5d275c6b1b
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user