Files
web/apps/scandic-web/components/Blocks/DynamicContent/Overview/MembershipOverviewCard/SasBoostStatus.tsx
Matilda Landström 4970dfa2ed Merged in fix/LOY-439-boosted-by-sas-bug (pull request #3047)
fix(LOY-439): fix "boosted by sas" issue

* fix(LOY-439): fix "boosted by sas" issue


Approved-by: Chuma Mcphoy (We Ahead)
2025-11-04 09:09:30 +00:00

39 lines
1014 B
TypeScript

import { dt } from "@scandic-hotels/common/dt"
import { Divider } from "@scandic-hotels/design-system/Divider"
import { Typography } from "@scandic-hotels/design-system/Typography"
import { getIntl } from "@/i18n"
import { getLang } from "@/i18n/serverContext"
import styles from "./membershipOverviewCard.module.css"
interface SasBoostStatusProps {
expiryDate: string
}
export default async function SasBoostStatus({
expiryDate,
}: SasBoostStatusProps) {
const lang = await getLang()
const intl = await getIntl()
const sasBoostExpiryText = intl.formatMessage(
{
id: "membershipOverViewCard.sasBoostedUntilDate",
defaultMessage: "Boosted by SAS until {date}",
},
{
date: dt(expiryDate).locale(lang).format("D MMM YYYY"),
}
)
return (
<>
<Divider variant="vertical" color="Border/Divider/Accent" />
<Typography variant="Label/xsRegular">
<span className={styles.headingText}>{sasBoostExpiryText}</span>
</Typography>
</>
)
}