feat(SW-706): make eslint rule 'formatjs/no-literal-string-in-jsx' pass
This commit is contained in:
@@ -22,7 +22,9 @@ export default function Error({
|
||||
<p>
|
||||
<strong>
|
||||
{intl.formatMessage(
|
||||
{ id: "Breadcrumbs failed for this page ({errorId})" },
|
||||
{
|
||||
defaultMessage: "Breadcrumbs failed for this page ({errorId})",
|
||||
},
|
||||
{
|
||||
errorId: `${error.digest}@${Date.now()}`,
|
||||
}
|
||||
|
||||
@@ -22,7 +22,9 @@ export default function Error({
|
||||
<p>
|
||||
<strong>
|
||||
{intl.formatMessage(
|
||||
{ id: "Error loading this page ({errorId})" },
|
||||
{
|
||||
defaultMessage: "Error loading this page ({errorId})",
|
||||
},
|
||||
{
|
||||
errorId: `${error.digest}@${Date.now()}`,
|
||||
}
|
||||
|
||||
@@ -37,7 +37,11 @@ export default async function MyPages({}: PageArgs<
|
||||
{content?.length ? (
|
||||
<Blocks blocks={content} />
|
||||
) : (
|
||||
<p>{intl.formatMessage({ id: "No content published" })}</p>
|
||||
<p>
|
||||
{intl.formatMessage({
|
||||
defaultMessage: "No content published",
|
||||
})}
|
||||
</p>
|
||||
)}
|
||||
</main>
|
||||
<TrackingSDK pageData={tracking} />
|
||||
|
||||
@@ -25,7 +25,9 @@ export default function Error({
|
||||
<p>
|
||||
<strong>
|
||||
{intl.formatMessage(
|
||||
{ id: "An error occurred ({errorId})" },
|
||||
{
|
||||
defaultMessage: "An error occurred ({errorId})",
|
||||
},
|
||||
{
|
||||
errorId: `${error.digest}@${Date.now()}`,
|
||||
}
|
||||
|
||||
@@ -128,12 +128,17 @@ export default async function DetailsPage({
|
||||
<Alert
|
||||
type={AlertTypeEnum.Alarm}
|
||||
variant="inline"
|
||||
heading={intl.formatMessage({ id: "Room sold out" })}
|
||||
heading={intl.formatMessage({
|
||||
defaultMessage: "Room sold out",
|
||||
})}
|
||||
text={intl.formatMessage({
|
||||
id: "Unfortunately, one of the rooms you selected is sold out. Please choose another room to proceed.",
|
||||
defaultMessage:
|
||||
"Unfortunately, one of the rooms you selected is sold out. Please choose another room to proceed.",
|
||||
})}
|
||||
link={{
|
||||
title: intl.formatMessage({ id: "Change room" }),
|
||||
title: intl.formatMessage({
|
||||
defaultMessage: "Change room",
|
||||
}),
|
||||
url: `${selectRate(lang)}?${selectRoomParams.toString()}`,
|
||||
keepSearchParams: true,
|
||||
}}
|
||||
|
||||
@@ -26,6 +26,7 @@ export default function HotelReservationPage({ params }: PageArgs<LangParams>) {
|
||||
}
|
||||
|
||||
return (
|
||||
// eslint-disable-next-line formatjs/no-literal-string-in-jsx
|
||||
<div className={styles.page}>
|
||||
<TrackingSDK pageData={pageTrackingData} />
|
||||
</div>
|
||||
|
||||
@@ -61,7 +61,9 @@ export default function Error({
|
||||
return (
|
||||
<section className={styles.layout}>
|
||||
<div className={styles.content}>
|
||||
{intl.formatMessage({ id: "Something went wrong!" })}
|
||||
{intl.formatMessage({
|
||||
defaultMessage: "Something went wrong!",
|
||||
})}
|
||||
{env.NEXT_PUBLIC_NODE_ENV === "development" && (
|
||||
<pre>{error.stack || error.message}</pre>
|
||||
)}
|
||||
|
||||
@@ -52,6 +52,7 @@ export default async function RootLayout({
|
||||
id="Cookiebot"
|
||||
src="https://consent.cookiebot.com/uc.js"
|
||||
/>
|
||||
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
|
||||
<Script id="ensure-adobeDataLayer">{`
|
||||
window.adobeDataLayer = window.adobeDataLayer || []
|
||||
`}</Script>
|
||||
|
||||
@@ -6,8 +6,9 @@ export default async function MiddlewareError({
|
||||
params,
|
||||
}: LayoutArgs<LangParams & StatusParams>) {
|
||||
return (
|
||||
// eslint-disable-next-line formatjs/no-literal-string-in-jsx
|
||||
<div className={styles.layout}>
|
||||
Middleware error {params.lang}: {params.status}
|
||||
Middleware error {params.lang} {params.status}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user