Merged in feature/SW-3595-sas-info-boxes (pull request #3177)

Feature/SW-3595 Add info boxes to SAS start page & Eurobonus alert to select-hotel page on SAS

* wip

* feat(SW-3595): Add info boxes to SAS start page

* Add InfoBox to design-system
* Add background gradient to SAS start page

* update variable naming and conditionalize the eurobonus message on select-hotel

* SAS startpage update default message

* make select-hotel a bit more generic with slot={} instead of alert={}


Approved-by: Anton Gunnarsson
This commit is contained in:
Joakim Jäderberg
2025-11-19 10:50:04 +00:00
parent 32e5c8d357
commit db30588f63
15 changed files with 459 additions and 105 deletions

View File

@@ -1,8 +1,11 @@
import { SelectHotelPage as SelectHotelPagePrimitive } from "@scandic-hotels/booking-flow/pages/SelectHotelPage"
import { AlertTypeEnum } from "@scandic-hotels/common/constants/alert"
import { toCapitalCase } from "@scandic-hotels/common/utils/toCapitalCase"
import { Alert } from "@scandic-hotels/design-system/Alert"
import { bookingFlowConfig } from "@/constants/bookingFlowConfig"
import { getIntl } from "@/i18n"
import { getLang } from "@/i18n/serverContext"
import type { Metadata } from "next"
@@ -26,12 +29,29 @@ export async function generateMetadata({
export default async function SelectHotelPage(props: PageArgs<LangParams>) {
const searchParams = await props.searchParams
const lang = await getLang()
const intl = await getIntl()
return (
<SelectHotelPagePrimitive
lang={lang}
searchParams={searchParams}
config={bookingFlowConfig}
topSlot={
bookingFlowConfig.redemptionEnabled ? (
<Alert
heading={intl.formatMessage({
id: "selectHotel.earnEuroBonusPointsAlert.heading",
defaultMessage: "Earn & use EuroBonus points",
})}
text={intl.formatMessage({
id: "selectHotel.earnEuroBonusPointsAlert.text",
defaultMessage:
"Collect new points with every booking, or use your current points to pay for hotel stays.",
})}
type={AlertTypeEnum.Info}
/>
) : undefined
}
/>
)
}