feat: refactor NewDates, clean up legacy code
This reverts commit 0c7836fa59.
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import { useMyStayStore } from "@/stores/my-stay"
|
||||
|
||||
import Row from "./Row"
|
||||
|
||||
import { RoomPackageCodeEnum } from "@/types/components/hotelReservation/selectRate/roomFilter"
|
||||
|
||||
export default function Packages() {
|
||||
const intl = useIntl()
|
||||
|
||||
const packages = useMyStayStore(
|
||||
(state) =>
|
||||
state.bookedRoom.packages
|
||||
?.filter((item) =>
|
||||
Object.values(RoomPackageCodeEnum).includes(
|
||||
item.code as RoomPackageCodeEnum
|
||||
)
|
||||
)
|
||||
.map((item) => item.description) || []
|
||||
)
|
||||
|
||||
if (!packages.length) {
|
||||
return null
|
||||
}
|
||||
|
||||
return (
|
||||
<Row
|
||||
icon="meeting_room"
|
||||
text={packages.join(", ")}
|
||||
title={intl.formatMessage({
|
||||
defaultMessage: "Room classification",
|
||||
})}
|
||||
/>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user