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

@@ -29,9 +29,12 @@ export default function RewardNight() {
trigger,
} = useFormContext<BookingWidgetSchema>()
const ref = useRef<HTMLDivElement | null>(null)
const reward = intl.formatMessage({ id: "Book Reward Night" })
const reward = intl.formatMessage({
defaultMessage: "Book Reward Night",
})
const rewardNightTooltip = intl.formatMessage({
id: "As a Scandic Friends member you need to be logged in to book a reward night (membership number and password). The points can be used to book reward nights at all Scandic hotels.",
defaultMessage:
"As a Scandic Friends member you need to be logged in to book a reward night (membership number and password). The points can be used to book reward nights at all Scandic hotels.",
})
const redemptionErr = errors[REDEMPTION]
const isMultiRoomError = redemptionErr?.message?.indexOf("Multi-room") === 0
@@ -122,7 +125,9 @@ export default function RewardNight() {
color="Icon/Feedback/Information"
className={styles.errorIcon}
/>
{intl.formatMessage({ id: redemptionErr.message })}
{intl.formatMessage({
defaultMessage: redemptionErr.message,
})}
</Caption>
{isMultiRoomError ? <RemoveExtraRooms /> : null}
</div>