feat: add no breakfast message to price details modal and to conf page receipt

This commit is contained in:
Simon Emanuelsson
2025-05-09 11:56:50 +02:00
parent 3cd8c59dd3
commit ca29237f2e
14 changed files with 389 additions and 279 deletions

View File

@@ -64,7 +64,8 @@ export default function Steps({ closeModal }: ChangeDatesStepsProps) {
setDates({ fromDate, toDate })
const pkgsSum = sumPackages(packages)
const extraPrice = pkgsSum.price + (breakfast?.localPrice.totalPrice || 0)
const extraPrice =
pkgsSum.price + ((breakfast && breakfast.localPrice.totalPrice) || 0)
if (isLoggedIn && "member" in data.product && data.product.member) {
const { currency, pricePerStay } = data.product.member.localPrice
setNewPrice(formatPrice(intl, pricePerStay + extraPrice, currency))