Merged in fix/BOOK-584-red-price-strikethrough (pull request #3298)
fix(BOOK-584): show discounted if specialrate or member * fix(BOOK-584): show discounted if specialrate or member Approved-by: Anton Gunnarsson
This commit is contained in:
@@ -11,7 +11,7 @@ import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||
|
||||
import { useSelectRateContext } from "../../../../../contexts/SelectRate/SelectRateContext"
|
||||
import { useIsLoggedIn } from "../../../../../hooks/useIsLoggedIn"
|
||||
import { isBookingCodeRate } from "../utils"
|
||||
import { isSpecialRate } from "../utils"
|
||||
import SummaryContent from "./Content"
|
||||
|
||||
import styles from "./mobileSummary.module.css"
|
||||
@@ -58,10 +58,8 @@ export function MobileSummary() {
|
||||
}
|
||||
}, [isSummaryOpen])
|
||||
|
||||
const containsBookingCodeRate = selectedRates.rates.find(
|
||||
(r) => r && isBookingCodeRate(r)
|
||||
)
|
||||
const showDiscounted = containsBookingCodeRate || isUserLoggedIn
|
||||
const hasSpecialRate = selectedRates.rates.find((r) => r && isSpecialRate(r))
|
||||
const showDiscounted = hasSpecialRate || isUserLoggedIn
|
||||
|
||||
if (!selectedRates.totalPrice) {
|
||||
return null
|
||||
|
||||
Reference in New Issue
Block a user