From 365cb15f90ec02d3301355756de3b2bd019f6068 Mon Sep 17 00:00:00 2001 From: Chuma McPhoy Date: Mon, 28 Oct 2024 15:57:33 +0100 Subject: [PATCH] chore(SW-667): move formatMessage call to array --- .../Sidebar/JoinLoyalty/ReadMore/index.tsx | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/components/Sidebar/JoinLoyalty/ReadMore/index.tsx b/components/Sidebar/JoinLoyalty/ReadMore/index.tsx index 8fba3390e..8890c4172 100644 --- a/components/Sidebar/JoinLoyalty/ReadMore/index.tsx +++ b/components/Sidebar/JoinLoyalty/ReadMore/index.tsx @@ -12,10 +12,13 @@ export default async function ReadMore() { const [intl, lang] = await Promise.all([getIntl(), getLang()]) const links = [ - { href: faq[lang], translationId: "FAQ" }, + { + href: faq[lang], + text: intl.formatMessage({ id: "FAQ" }), + }, { href: membershipTermsAndConditions[lang], - translationId: "Membership terms and conditions", + text: intl.formatMessage({ id: "Membership terms and conditions" }), }, ] @@ -23,26 +26,23 @@ export default async function ReadMore() {
{intl.formatMessage({ id: "Read more" })}
- {links.map((link) => { - const translatedText = intl.formatMessage({ id: link.translationId }) - return ( - ( + + - - {translatedText} - - ) - })} + className={styles.icon} + height="20" + width="20" + /> + {link.text} + + ))}
)