feat(SW-706): make eslint rule 'formatjs/no-literal-string-in-jsx' pass
This commit is contained in:
@@ -50,24 +50,29 @@ export default function AdditionalInfoForm({
|
||||
<div>
|
||||
<Title level="h2" as="h3">
|
||||
{intl.formatMessage({
|
||||
id: "One last step",
|
||||
defaultMessage: "One last step",
|
||||
})}
|
||||
</Title>
|
||||
<Body>
|
||||
{intl.formatMessage({
|
||||
id: "We need some more details to confirm your identity.",
|
||||
defaultMessage:
|
||||
"We need some more details to confirm your identity.",
|
||||
})}
|
||||
</Body>
|
||||
</div>
|
||||
<div className={styles.inputs}>
|
||||
<Input
|
||||
label={intl.formatMessage({ id: "First name" })}
|
||||
label={intl.formatMessage({
|
||||
defaultMessage: "First name",
|
||||
})}
|
||||
name="firstName"
|
||||
placeholder="Anna"
|
||||
registerOptions={{ required: true }}
|
||||
/>
|
||||
<Input
|
||||
label={intl.formatMessage({ id: "Email" })}
|
||||
label={intl.formatMessage({
|
||||
defaultMessage: "Email",
|
||||
})}
|
||||
name="email"
|
||||
placeholder="anna@scandichotels.com"
|
||||
registerOptions={{ required: true }}
|
||||
@@ -80,7 +85,9 @@ export default function AdditionalInfoForm({
|
||||
theme="base"
|
||||
disabled={form.formState.isSubmitting}
|
||||
>
|
||||
{intl.formatMessage({ id: "Confirm" })}
|
||||
{intl.formatMessage({
|
||||
defaultMessage: "Confirm",
|
||||
})}
|
||||
</Button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -50,7 +50,7 @@ export default function FindMyBooking() {
|
||||
console.error("Failed to create ref id", error)
|
||||
toast.error(
|
||||
intl.formatMessage({
|
||||
id: "Failed to submit form, please try again later.",
|
||||
defaultMessage: "Failed to submit form, please try again later.",
|
||||
})
|
||||
)
|
||||
},
|
||||
@@ -68,35 +68,46 @@ export default function FindMyBooking() {
|
||||
<form onSubmit={form.handleSubmit(onSubmit)} className={styles.form}>
|
||||
<div>
|
||||
<Title level="h2" as="h3">
|
||||
{intl.formatMessage({ id: "Find your stay" })}
|
||||
{intl.formatMessage({
|
||||
defaultMessage: "Find your stay",
|
||||
})}
|
||||
</Title>
|
||||
<Body>
|
||||
{intl.formatMessage({
|
||||
id: "View and manage your stay made on Scandic's website",
|
||||
defaultMessage:
|
||||
"View and manage your stay made on Scandic's website",
|
||||
})}
|
||||
</Body>
|
||||
</div>
|
||||
<div className={[styles.inputs, styles.grid].join(" ")}>
|
||||
<Input
|
||||
label={intl.formatMessage({ id: "Booking number" })}
|
||||
label={intl.formatMessage({
|
||||
defaultMessage: "Booking number",
|
||||
})}
|
||||
name="confirmationNumber"
|
||||
placeholder="XXXXXX"
|
||||
registerOptions={{ required: true }}
|
||||
/>
|
||||
<Input
|
||||
label={intl.formatMessage({ id: "First name" })}
|
||||
label={intl.formatMessage({
|
||||
defaultMessage: "First name",
|
||||
})}
|
||||
name="firstName"
|
||||
placeholder="Anna"
|
||||
registerOptions={{ required: true }}
|
||||
/>
|
||||
<Input
|
||||
label={intl.formatMessage({ id: "Last name" })}
|
||||
label={intl.formatMessage({
|
||||
defaultMessage: "Last name",
|
||||
})}
|
||||
name="lastName"
|
||||
placeholder="Andersson"
|
||||
registerOptions={{ required: true }}
|
||||
/>
|
||||
<Input
|
||||
label={intl.formatMessage({ id: "Email" })}
|
||||
label={intl.formatMessage({
|
||||
defaultMessage: "Email",
|
||||
})}
|
||||
name="email"
|
||||
placeholder="anna@scandichotels.com"
|
||||
registerOptions={{ required: true }}
|
||||
@@ -105,11 +116,16 @@ export default function FindMyBooking() {
|
||||
<div className={styles.buttons}>
|
||||
<div className={styles.footnote}>
|
||||
<Caption type="bold">
|
||||
{intl.formatMessage({ id: "Can't find your stay?" })}
|
||||
{intl.formatMessage({
|
||||
defaultMessage: "Can't find your stay?",
|
||||
})}
|
||||
</Caption>
|
||||
<Caption>
|
||||
{intl.formatMessage(
|
||||
{ id: "Please contact <link>customer service</link>." },
|
||||
{
|
||||
defaultMessage:
|
||||
"Please contact <link>customer service</link>.",
|
||||
},
|
||||
{
|
||||
link: (str) => (
|
||||
<Link
|
||||
@@ -132,7 +148,9 @@ export default function FindMyBooking() {
|
||||
theme="base"
|
||||
disabled={form.formState.isSubmitting || update.isPending}
|
||||
>
|
||||
{intl.formatMessage({ id: "Find" })}
|
||||
{intl.formatMessage({
|
||||
defaultMessage: "Find",
|
||||
})}
|
||||
</Button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user