fix(SW-288): usage of intl

This commit is contained in:
Matilda Landström
2024-08-28 11:51:08 +02:00
parent 8257a6fc2d
commit f3a20e9a27
2 changed files with 9 additions and 5 deletions

View File

@@ -23,7 +23,7 @@ export default async function NextLevelBenefitsBlock({
subtitle,
link,
}: AccountPageComponentProps) {
const { formatMessage } = await getIntl()
const intl = await getIntl()
const user = await serverClient().user.get()
if (!user || "error" in user) {
return null
@@ -45,11 +45,15 @@ export default async function NextLevelBenefitsBlock({
<article key={benefit.title} className={styles.card}>
<Chip>
<Lock height={16} />
{formatMessage({ id: "Level up to unlock" })}
{intl.formatMessage({ id: "Level up to unlock" })}
</Chip>
ntl.formatMessage
<div className={styles.textContainer}>
<Body color="peach50" textAlign="center">
{formatMessage({ id: "As our" }, { level: nextLevel.name })}
{intl.formatMessage(
{ id: "As our" },
{ level: nextLevel.name }
)}
</Body>{" "}
<Title
level="h4"