Files
Erik Tiekstra b3c4761ae5 Merged in chore/BOOK-773-replace-old-typography-variables (pull request #3515)
Chore/BOOK-773 replace old typography variables

* chore(BOOK-773): Replaced body typography

* chore(BOOK-773): Replaced caption typography

* chore(BOOK-773): Replaced footnote typography

* chore(BOOK-773): Replaced subtitle typography


Approved-by: Bianca Widstam
2026-02-03 15:07:18 +00:00

46 lines
1.2 KiB
TypeScript

"use client"
import { useIntl } from "react-intl"
import { Typography } from "@scandic-hotels/design-system/Typography"
import { useBookingFlowConfig } from "../../bookingFlowConfig/bookingFlowConfigContext"
import styles from "./signupPromo.module.css"
export default function SignupPromoMobile() {
return (
<div
data-footer-spacing-signup
className={styles.memberDiscountBannerMobile}
>
<Typography variant="Body/Supporting text (caption)/smRegular">
<p>
<Message />
</p>
</Typography>
</div>
)
}
function Message() {
const intl = useIntl()
const config = useBookingFlowConfig()
switch (config.variant) {
case "partner-sas":
return intl.formatMessage({
id: "signup.toGetTheScandicMemberPrice",
defaultMessage: "Enter ID or join to get the Scandic Friends price.",
})
case "scandic":
return intl.formatMessage({
id: "signup.joinOrLoginForMemberPricing",
defaultMessage: "Join or log in while booking for member pricing.",
})
default:
const _exhaustiveCheck: never = config.variant
throw new Error(`Unknown variant: ${config.variant}`)
}
}