fix(SW-188): improve semantics, use hotel instead of attribute naming
This commit is contained in:
@@ -27,8 +27,8 @@ export default async function SelectHotelPage({
|
||||
return null
|
||||
}
|
||||
|
||||
const { attributes } = hotelData
|
||||
const hotels = [attributes]
|
||||
const { hotel } = hotelData
|
||||
const hotels = [hotel]
|
||||
|
||||
const hotelFilters = await serverClient().hotel.getFilters({
|
||||
hotelId: "879",
|
||||
|
||||
@@ -15,14 +15,13 @@ export default async function SelectRate({ params }: PageArgs<LangParams>) {
|
||||
setLang(params.lang)
|
||||
|
||||
// TODO: pass the correct hotel ID
|
||||
const hotel = await serverClient().hotel.getHotel({
|
||||
const hotelData = await serverClient().hotel.getHotel({
|
||||
hotelId: "879",
|
||||
language: getLang(),
|
||||
})
|
||||
|
||||
if (!hotel) return null
|
||||
|
||||
const { attributes } = hotel
|
||||
if (!hotelData) return null
|
||||
const { hotel } = hotelData
|
||||
|
||||
const rooms = await serverClient().hotel.getRates({
|
||||
// TODO: pass the correct hotel ID and all other parameters that should be included in the search
|
||||
@@ -33,7 +32,7 @@ export default async function SelectRate({ params }: PageArgs<LangParams>) {
|
||||
<div className={styles.page}>
|
||||
<main className={styles.content}>
|
||||
<div className={styles.hotelInfo}>
|
||||
<HotelCard hotel={attributes} />
|
||||
<HotelCard hotel={hotel} />
|
||||
</div>
|
||||
<RoomSelection rooms={rooms} />
|
||||
<FlexibilitySelection />
|
||||
|
||||
Reference in New Issue
Block a user