Merged in fix/SW-2926-hotel-special-alerts- (pull request #2580)
fix(SW-2926): Display alerts in booking flow if date range matches search dates and in hotel page if current date is in date range * fix(SW-2926): Display alerts in booking flow if date range matches search dates and in hotel page if current date is in date range * fix(SW-2926) Updated hotel alerts with respect to booking dates * fix(SW-2926): Optimized code Approved-by: Matilda Landström
This commit is contained in:
@@ -15,6 +15,7 @@ import Alert from "@/components/TempDesignSystem/Alert"
|
||||
import { getIntl } from "@/i18n"
|
||||
import BookingConfirmationProvider from "@/providers/BookingConfirmationProvider"
|
||||
|
||||
import { getHotelAlertsForBookingDates } from "../utils"
|
||||
import Confirmation from "./Confirmation"
|
||||
import Tracking from "./Tracking"
|
||||
import { mapRoomState } from "./utils"
|
||||
@@ -77,7 +78,11 @@ export default async function BookingConfirmation({
|
||||
<PaymentDetails />
|
||||
<Divider color="Border/Divider/Subtle" />
|
||||
<HotelDetails hotel={hotel} />
|
||||
{hotel.specialAlerts.map((alert) => (
|
||||
{getHotelAlertsForBookingDates(
|
||||
hotel.specialAlerts,
|
||||
booking.checkInDate,
|
||||
booking.checkOutDate
|
||||
).map((alert) => (
|
||||
<div key={alert.id}>
|
||||
<Alert
|
||||
type={alert.type}
|
||||
|
||||
Reference in New Issue
Block a user