feat(SW-706): make eslint rule 'formatjs/no-literal-string-in-jsx' pass
This commit is contained in:
@@ -20,18 +20,25 @@ export function AlreadyLinkedError() {
|
||||
<SASModal>
|
||||
<MaterialIcon icon="cancel" isFilled size={64} />
|
||||
<Typography variant="Title/Subtitle/lg">
|
||||
<h1>{intl.formatMessage({ id: "Accounts are already linked" })}</h1>
|
||||
<h1>
|
||||
{intl.formatMessage({
|
||||
defaultMessage: "Accounts are already linked",
|
||||
})}
|
||||
</h1>
|
||||
</Typography>
|
||||
<Typography variant="Body/Paragraph/mdRegular">
|
||||
<p>
|
||||
{intl.formatMessage({
|
||||
id: "Looks like you’ve already linked your Scandic Friends and SAS EuroBonus accounts!",
|
||||
defaultMessage:
|
||||
"Looks like you’ve already linked your Scandic Friends and SAS EuroBonus accounts!",
|
||||
})}
|
||||
</p>
|
||||
</Typography>
|
||||
<Button theme="base" asChild>
|
||||
<Link href={partnerSas[lang]}>
|
||||
{intl.formatMessage({ id: "View your linked accounts" })}
|
||||
{intl.formatMessage({
|
||||
defaultMessage: "View your linked accounts",
|
||||
})}
|
||||
</Link>
|
||||
</Button>
|
||||
<SASModalDivider />
|
||||
|
||||
@@ -25,18 +25,25 @@ export function DateOfBirthError() {
|
||||
size={64}
|
||||
/>
|
||||
<Typography variant="Title/Subtitle/lg">
|
||||
<h1>{intl.formatMessage({ id: "Date of birth not matching" })}</h1>
|
||||
<h1>
|
||||
{intl.formatMessage({
|
||||
defaultMessage: "Date of birth not matching",
|
||||
})}
|
||||
</h1>
|
||||
</Typography>
|
||||
<Typography variant="Body/Paragraph/mdRegular">
|
||||
<p>
|
||||
{intl.formatMessage({
|
||||
id: "We couldn’t connect your accounts. Please contact us and we’ll help you resolve this.",
|
||||
defaultMessage:
|
||||
"We couldn’t connect your accounts. Please contact us and we’ll help you resolve this.",
|
||||
})}
|
||||
</p>
|
||||
</Typography>
|
||||
<Button theme="base" asChild>
|
||||
<Link href={profile[lang]}>
|
||||
{intl.formatMessage({ id: "View your details" })}
|
||||
{intl.formatMessage({
|
||||
defaultMessage: "View your details",
|
||||
})}
|
||||
</Link>
|
||||
</Button>
|
||||
<SASModalDivider />
|
||||
|
||||
@@ -13,18 +13,22 @@ export function FailedAttemptsError() {
|
||||
|
||||
return (
|
||||
<GenericError
|
||||
title={intl.formatMessage({ id: "Too many failed attempts" })}
|
||||
title={intl.formatMessage({
|
||||
defaultMessage: "Too many failed attempts",
|
||||
})}
|
||||
variant="info"
|
||||
>
|
||||
<Typography variant="Body/Paragraph/mdRegular">
|
||||
<p>
|
||||
{intl.formatMessage({
|
||||
id: "Please wait 1 hour before trying again.",
|
||||
defaultMessage: "Please wait 1 hour before trying again.",
|
||||
})}
|
||||
</p>
|
||||
</Typography>
|
||||
<Button theme="base" disabled>
|
||||
{intl.formatMessage({ id: "Send new code" })}
|
||||
{intl.formatMessage({
|
||||
defaultMessage: "Send new code",
|
||||
})}
|
||||
</Button>
|
||||
</GenericError>
|
||||
)
|
||||
|
||||
@@ -18,7 +18,11 @@ export function SASModalDivider() {
|
||||
return (
|
||||
<div className={styles.divider}>
|
||||
<Typography variant="Body/Paragraph/mdRegular">
|
||||
<span>{intl.formatMessage({ id: "or" })}</span>
|
||||
<span>
|
||||
{intl.formatMessage({
|
||||
defaultMessage: "or",
|
||||
})}
|
||||
</span>
|
||||
</Typography>
|
||||
</div>
|
||||
)
|
||||
@@ -27,13 +31,17 @@ export function SASModalDivider() {
|
||||
export function SASModalContactBlock() {
|
||||
const intl = useIntl()
|
||||
|
||||
const phone = intl.formatMessage({ id: "+46 8 517 517 00" })
|
||||
const phone = intl.formatMessage({
|
||||
defaultMessage: "+46 8 517 517 00",
|
||||
})
|
||||
|
||||
return (
|
||||
<div style={{ display: "flex", flexDirection: "column" }}>
|
||||
<Typography variant="Title/Subtitle/md">
|
||||
<h4 className={styles.contactBlockTitle}>
|
||||
{intl.formatMessage({ id: "Contact us" })}
|
||||
{intl.formatMessage({
|
||||
defaultMessage: "Contact us",
|
||||
})}
|
||||
</h4>
|
||||
</Typography>
|
||||
<Link
|
||||
@@ -42,6 +50,7 @@ export function SASModalContactBlock() {
|
||||
>
|
||||
{phone}
|
||||
</Link>
|
||||
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
|
||||
<Link href="mailto:member@scandichotels.com" textDecoration="underline">
|
||||
member@scandichotels.com
|
||||
</Link>
|
||||
|
||||
@@ -13,18 +13,22 @@ export function TooManyCodesError() {
|
||||
|
||||
return (
|
||||
<GenericError
|
||||
title={intl.formatMessage({ id: "You’ve requested too many codes" })}
|
||||
title={intl.formatMessage({
|
||||
defaultMessage: "You’ve requested too many codes",
|
||||
})}
|
||||
variant="info"
|
||||
>
|
||||
<Typography variant="Body/Paragraph/mdRegular">
|
||||
<p>
|
||||
{intl.formatMessage({
|
||||
id: "Please wait 1 hour before trying again.",
|
||||
defaultMessage: "Please wait 1 hour before trying again.",
|
||||
})}
|
||||
</p>
|
||||
</Typography>
|
||||
<Button theme="base" disabled>
|
||||
{intl.formatMessage({ id: "Send new code" })}
|
||||
{intl.formatMessage({
|
||||
defaultMessage: "Send new code",
|
||||
})}
|
||||
</Button>
|
||||
</GenericError>
|
||||
)
|
||||
|
||||
@@ -13,18 +13,22 @@ export function TooManyFailedAttemptsError() {
|
||||
|
||||
return (
|
||||
<GenericError
|
||||
title={intl.formatMessage({ id: "Too many failed attempts." })}
|
||||
title={intl.formatMessage({
|
||||
defaultMessage: "Too many failed attempts.",
|
||||
})}
|
||||
variant="info"
|
||||
>
|
||||
<Typography variant="Body/Paragraph/mdRegular">
|
||||
<p>
|
||||
{intl.formatMessage({
|
||||
id: "Please wait 1 hour before trying again.",
|
||||
defaultMessage: "Please wait 1 hour before trying again.",
|
||||
})}
|
||||
</p>
|
||||
</Typography>
|
||||
<Button theme="base" disabled>
|
||||
{intl.formatMessage({ id: "Send new code" })}
|
||||
{intl.formatMessage({
|
||||
defaultMessage: "Send new code",
|
||||
})}
|
||||
</Button>
|
||||
</GenericError>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user