feat(SW-706): make eslint rule 'formatjs/no-literal-string-in-jsx' pass
This commit is contained in:
@@ -151,9 +151,12 @@ export default function HotelCardListing({
|
||||
{!hotels?.length && activeFilters ? (
|
||||
<Alert
|
||||
type={AlertTypeEnum.Info}
|
||||
heading={intl.formatMessage({ id: "No hotels match your filters" })}
|
||||
heading={intl.formatMessage({
|
||||
defaultMessage: "No hotels match your filters",
|
||||
})}
|
||||
text={intl.formatMessage({
|
||||
id: "It looks like no hotels match your filters. Try adjusting your search to find the perfect stay.",
|
||||
defaultMessage:
|
||||
"It looks like no hotels match your filters. Try adjusting your search to find the perfect stay.",
|
||||
})}
|
||||
/>
|
||||
) : null}
|
||||
|
||||
@@ -50,14 +50,18 @@ export function getSortedHotels({
|
||||
if (bookingCode) {
|
||||
const bookingCodeRateHotels = availableHotels.filter(
|
||||
(hotel) =>
|
||||
(hotel.availability.productType?.public?.rateType !== RateTypeEnum.Regular &&
|
||||
hotel.availability.productType?.member?.rateType !== RateTypeEnum.Regular) &&
|
||||
hotel.availability.productType?.public?.rateType !==
|
||||
RateTypeEnum.Regular &&
|
||||
hotel.availability.productType?.member?.rateType !==
|
||||
RateTypeEnum.Regular &&
|
||||
!!hotel.availability.productType
|
||||
)
|
||||
const regularRateHotels = availableHotels.filter(
|
||||
(hotel) =>
|
||||
hotel.availability.productType?.public?.rateType === RateTypeEnum.Regular ||
|
||||
hotel?.availability.productType?.member?.rateType === RateTypeEnum.Regular
|
||||
hotel.availability.productType?.public?.rateType ===
|
||||
RateTypeEnum.Regular ||
|
||||
hotel?.availability.productType?.member?.rateType ===
|
||||
RateTypeEnum.Regular
|
||||
)
|
||||
|
||||
return bookingCodeRateHotels
|
||||
|
||||
Reference in New Issue
Block a user