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>
|
</div>
|
||||||
{specialAlerts.length ? (
|
{specialAlerts.length ? (
|
||||||
<div className={styles.alertsContainer}>
|
<div className={styles.alertsContainer}>
|
||||||
{specialAlerts.map((alert) => (
|
{specialAlerts
|
||||||
<Alert
|
.filter((alert) => !alert.displayInBookingFlow)
|
||||||
key={alert.id}
|
.map((alert) => (
|
||||||
type={alert.type}
|
<Alert
|
||||||
heading={alert.heading}
|
key={alert.id}
|
||||||
text={alert.text}
|
type={alert.type}
|
||||||
/>
|
heading={alert.heading}
|
||||||
))}
|
text={alert.text}
|
||||||
|
/>
|
||||||
|
))}
|
||||||
</div>
|
</div>
|
||||||
) : null}
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ export const specialAlertsSchema = z
|
|||||||
id: `alert-${alert.type}-${idx}`,
|
id: `alert-${alert.type}-${idx}`,
|
||||||
text: alert.description || null,
|
text: alert.description || null,
|
||||||
type: AlertTypeEnum.Info,
|
type: AlertTypeEnum.Info,
|
||||||
|
displayInBookingFlow: alert.displayInBookingFlow,
|
||||||
}))
|
}))
|
||||||
})
|
})
|
||||||
.default([])
|
.default([])
|
||||||
|
|||||||
Reference in New Issue
Block a user