fix: destructure attributes
This commit is contained in:
@@ -15,27 +15,24 @@ export default async function HotelPage({ lang }: LangParams) {
|
||||
return null
|
||||
}
|
||||
|
||||
const hotelPageData = await serverClient().hotel.getHotel({
|
||||
const {
|
||||
data: { attributes },
|
||||
} = await serverClient().hotel.getHotel({
|
||||
hotelId: hotelPageIdentifierData.hotel_page_id,
|
||||
language: lang,
|
||||
})
|
||||
const hotelAttributes = hotelPageData.data.attributes
|
||||
|
||||
return (
|
||||
<main className={styles.pageContainer}>
|
||||
<div className={styles.introContainer}>
|
||||
<IntroSection
|
||||
hotelName={hotelAttributes.name}
|
||||
hotelDescription={
|
||||
hotelAttributes.hotelContent.texts.descriptions.short
|
||||
}
|
||||
location={hotelAttributes.location}
|
||||
address={hotelAttributes.address}
|
||||
tripAdvisor={hotelAttributes.ratings.tripAdvisor}
|
||||
/>
|
||||
<AmenitiesList
|
||||
detailedFacilities={hotelAttributes.detailedFacilities}
|
||||
hotelName={attributes.name}
|
||||
hotelDescription={attributes.hotelContent.texts.descriptions.short}
|
||||
location={attributes.location}
|
||||
address={attributes.address}
|
||||
tripAdvisor={attributes.ratings.tripAdvisor}
|
||||
/>
|
||||
<AmenitiesList detailedFacilities={attributes.detailedFacilities} />
|
||||
</div>
|
||||
</main>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user