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

@@ -32,16 +32,22 @@ export default function GuestsRoomsPickerDialog({
const { getFieldState, trigger, setValue, getValues } =
useFormContext<BookingWidgetSchema>()
const roomsValue = useWatch<BookingWidgetSchema, "rooms">({ name: "rooms" })
const addRoomLabel = intl.formatMessage({ id: "Add room" })
const doneLabel = intl.formatMessage({ id: "Done" })
const addRoomLabel = intl.formatMessage({
defaultMessage: "Add room",
})
const doneLabel = intl.formatMessage({
defaultMessage: "Done",
})
// Disable add room if booking code is either voucher or corporate cheque, or reward night is enabled
const addRoomDisabledTextForSpecialRate = getValues(REDEMPTION)
? intl.formatMessage({
id: "Multi-room booking is not available with reward night.",
defaultMessage:
"Multi-room booking is not available with reward night.",
})
: getValues("bookingCode.value")?.toLowerCase().startsWith("vo") &&
intl.formatMessage({
id: "Multi-room booking is not available with this booking code.",
defaultMessage:
"Multi-room booking is not available with this booking code.",
})
const handleClose = useCallback(async () => {