feat(SW-706): make eslint rule 'formatjs/no-literal-string-in-jsx' pass

This commit is contained in:
Michael Zetterberg
2025-02-07 06:51:36 +01:00
parent e22fc1f3c8
commit 440e1f92df
393 changed files with 4839 additions and 1554 deletions

View File

@@ -12,13 +12,18 @@ export default function Initial({ totalSurprises, onOpen }: InitialProps) {
const intl = useIntl()
return (
<Card title={intl.formatMessage({ id: "Surprise!" })}>
<Card
title={intl.formatMessage({
defaultMessage: "Surprise!",
})}
>
<Body textAlign="center">
{totalSurprises > 1 ? (
<>
{intl.formatMessage(
{
id: "You have <b>{amount}</b> gifts waiting for you!",
defaultMessage:
"You have <b>{amount}</b> gifts waiting for you!",
},
{
amount: totalSurprises,
@@ -27,18 +32,18 @@ export default function Initial({ totalSurprises, onOpen }: InitialProps) {
)}
<br />
{intl.formatMessage({
id: "Hurry up and use them before they expire!",
defaultMessage: "Hurry up and use them before they expire!",
})}
</>
) : (
intl.formatMessage({
id: "We have a special gift waiting for you!",
defaultMessage: "We have a special gift waiting for you!",
})
)}
</Body>
<Caption>
{intl.formatMessage({
id: "You'll find all your gifts in 'My benefits'",
defaultMessage: "You'll find all your gifts in 'My benefits'",
})}
</Caption>
@@ -52,7 +57,7 @@ export default function Initial({ totalSurprises, onOpen }: InitialProps) {
>
{intl.formatMessage(
{
id: "Open {amount, plural, one {gift} other {gifts}}",
defaultMessage: "Open {amount, plural, one {gift} other {gifts}}",
},
{ amount: totalSurprises }
)}