From f3a20e9a27b33be657280314bd68ed061bdc5c8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matilda=20Landstr=C3=B6m?= Date: Wed, 28 Aug 2024 11:51:08 +0200 Subject: [PATCH] fix(SW-288): usage of intl --- components/MyPages/Blocks/Benefits/NextLevel/index.tsx | 10 +++++++--- .../Blocks/Overview/Stats/ExpiringPoints/index.tsx | 4 ++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/components/MyPages/Blocks/Benefits/NextLevel/index.tsx b/components/MyPages/Blocks/Benefits/NextLevel/index.tsx index 4b1815d52..a8aea1e46 100644 --- a/components/MyPages/Blocks/Benefits/NextLevel/index.tsx +++ b/components/MyPages/Blocks/Benefits/NextLevel/index.tsx @@ -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({
- {formatMessage({ id: "Level up to unlock" })} + {intl.formatMessage({ id: "Level up to unlock" })} + ntl.formatMessage
- {formatMessage({ id: "As our" }, { level: nextLevel.name })} + {intl.formatMessage( + { id: "As our" }, + { level: nextLevel.name } + )} {" "} <Body color="white" textTransform="bold" textAlign="center"> - {formatMessage( + {intl.formatMessage( { id: "spendable points expiring by" }, { points: formatter.format(membership.pointsToExpire),