feat(SW-706): make eslint rule 'formatjs/no-literal-string-in-jsx' pass
This commit is contained in:
@@ -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 }
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user