Feat/lokalise rebuild * chore(lokalise): update translation ids * chore(lokalise): easier to switch between projects * chore(lokalise): update translation ids * . * . * . * . * . * . * chore(lokalise): update translation ids * chore(lokalise): update translation ids * . * . * . * chore(lokalise): update translation ids * chore(lokalise): update translation ids * . * . * chore(lokalise): update translation ids * chore(lokalise): update translation ids * chore(lokalise): new translations * merge * switch to errors for missing id's * merge * sync translations Approved-by: Linus Flood
48 lines
1.4 KiB
TypeScript
48 lines
1.4 KiB
TypeScript
import TrophyIcon from "@scandic-hotels/design-system/Icons/TrophyIcon"
|
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
|
|
|
import { getIntl } from "@/i18n"
|
|
|
|
import styles from "./successCard.module.css"
|
|
|
|
interface SuccessCardProps {
|
|
pointsEarned?: number | null
|
|
}
|
|
|
|
export default async function SuccessCard({ pointsEarned }: SuccessCardProps) {
|
|
const intl = await getIntl()
|
|
return (
|
|
<div className={styles.card}>
|
|
<TrophyIcon className={styles.icon} width={79} height={118} />
|
|
<div className={styles.content}>
|
|
<Typography variant="Title/Subtitle/md">
|
|
<h3 className={styles.title}>
|
|
{intl.formatMessage({
|
|
id: "myPages.helloBestFriend",
|
|
defaultMessage: "Hello Best Friend!",
|
|
})}
|
|
</h3>
|
|
</Typography>
|
|
{pointsEarned && (
|
|
<Typography variant="Body/Paragraph/mdRegular">
|
|
<p>
|
|
{intl.formatMessage(
|
|
{
|
|
id: "myPages.youHaveEarnedPointsThisMemberYear",
|
|
defaultMessage:
|
|
"You've earned {pointAmount} points this member year.",
|
|
},
|
|
{
|
|
pointAmount: (
|
|
<strong>{intl.formatNumber(pointsEarned)}</strong>
|
|
),
|
|
}
|
|
)}
|
|
</p>
|
|
</Typography>
|
|
)}
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|