diff --git a/components/HotelReservation/SelectRate/RoomSelection/RoomCard/index.tsx b/components/HotelReservation/SelectRate/RoomSelection/RoomCard/index.tsx index e2829a1d8..8cf0b5c21 100644 --- a/components/HotelReservation/SelectRate/RoomSelection/RoomCard/index.tsx +++ b/components/HotelReservation/SelectRate/RoomSelection/RoomCard/index.tsx @@ -59,13 +59,11 @@ export default function RoomCard({ ?.generalTerms } - function getBreakfastInformation(rate: RateDefinition | undefined) { - return rateDefinitions.find((def) => def.rateCode === rate?.rateCode) - ?.breakfastIncluded - } + const getBreakfastMessage = (rate: RateDefinition | undefined) => { + const breakfastInfo = rateDefinitions.find( + (def) => def.rateCode === rate?.rateCode + )?.breakfastIncluded - const breakfastMessage = (rate: RateDefinition | undefined) => { - const breakfastInfo = getBreakfastInformation(rate) switch (breakfastInfo) { case true: return intl.formatMessage({ id: "Breakfast is included." }) @@ -187,7 +185,7 @@ export default function RoomCard({