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

@@ -93,11 +93,15 @@ export default function ListingHotelCardDialog({
<div className={styles.pricesContainer}>
{redemptionPrice ? (
<Caption color="uiTextHighContrast">
{intl.formatMessage({ id: "Available rates" })}
{intl.formatMessage({
defaultMessage: "Available rates",
})}
</Caption>
) : (
<Caption color="uiTextHighContrast">
{intl.formatMessage({ id: "Per night from" })}
{intl.formatMessage({
defaultMessage: "Per night from",
})}
</Caption>
)}
<div className={styles.listingPrices}>
@@ -106,13 +110,16 @@ export default function ListingHotelCardDialog({
<Subtitle type="two">
{publicPrice} {currency}
</Subtitle>
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
{memberPrice && <Caption>/</Caption>}
</>
)}
{memberPrice && (
<Subtitle type="two" color="red" className={styles.memberPrice}>
{intl.formatMessage(
{ id: "{price} {currency}" },
{
defaultMessage: "{price} {currency}",
},
{
price: memberPrice,
currency,
@@ -131,7 +138,9 @@ export default function ListingHotelCardDialog({
color="none"
keepSearchParams
>
{intl.formatMessage({ id: "See rooms" })}
{intl.formatMessage({
defaultMessage: "See rooms",
})}
</Link>
</Button>
</div>