Merged in feat/SW-1495-hide-alerts-on-hotel-pages (pull request #1268)
feat(SW-1495): removed alerts on hotel pages when displayInBookingFlow is true * feat(SW-1495): removed alerts on hotel pages when displayInBookingFlow is true Approved-by: Fredrik Thorsson Approved-by: Matilda Landström
This commit is contained in:
@@ -169,14 +169,16 @@ export default async function HotelPage({ hotelId }: HotelPageProps) {
|
||||
</div>
|
||||
{specialAlerts.length ? (
|
||||
<div className={styles.alertsContainer}>
|
||||
{specialAlerts.map((alert) => (
|
||||
<Alert
|
||||
key={alert.id}
|
||||
type={alert.type}
|
||||
heading={alert.heading}
|
||||
text={alert.text}
|
||||
/>
|
||||
))}
|
||||
{specialAlerts
|
||||
.filter((alert) => !alert.displayInBookingFlow)
|
||||
.map((alert) => (
|
||||
<Alert
|
||||
key={alert.id}
|
||||
type={alert.type}
|
||||
heading={alert.heading}
|
||||
text={alert.text}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
) : null}
|
||||
</div>
|
||||
|
||||
@@ -32,6 +32,7 @@ export const specialAlertsSchema = z
|
||||
id: `alert-${alert.type}-${idx}`,
|
||||
text: alert.description || null,
|
||||
type: AlertTypeEnum.Info,
|
||||
displayInBookingFlow: alert.displayInBookingFlow,
|
||||
}))
|
||||
})
|
||||
.default([])
|
||||
|
||||
Reference in New Issue
Block a user