From 5d275c6b1bf5b92b9214d83c5b9b33caa6bb3488 Mon Sep 17 00:00:00 2001 From: Simon Emanuelsson Date: Thu, 26 Jun 2025 12:25:32 +0200 Subject: [PATCH] feat: add condition to show strikethrough price --- .../SelectRate/RoomsContainer/RateSummary/index.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/scandic-web/components/HotelReservation/SelectRate/RoomsContainer/RateSummary/index.tsx b/apps/scandic-web/components/HotelReservation/SelectRate/RoomsContainer/RateSummary/index.tsx index 152b48256..09d6321d0 100644 --- a/apps/scandic-web/components/HotelReservation/SelectRate/RoomsContainer/RateSummary/index.tsx +++ b/apps/scandic-web/components/HotelReservation/SelectRate/RoomsContainer/RateSummary/index.tsx @@ -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