fix(SW-188): improve semantics, use hotel instead of attribute naming

This commit is contained in:
Chuma McPhoy
2024-08-14 08:27:56 +02:00
parent ed379202c8
commit 3a2a58a9ca
7 changed files with 24 additions and 25 deletions

View File

@@ -25,7 +25,7 @@ export default async function HotelPage() {
include: ["RoomCategories"],
})
if (!hotelData) return null
const { attributes, roomCategories } = hotelData
const { hotel, roomCategories } = hotelData
return (
<div className={styles.pageContainer}>
@@ -33,14 +33,14 @@ export default async function HotelPage() {
<main className={styles.mainSection}>
<div className={styles.introContainer}>
<IntroSection
hotelName={attributes.name}
hotelDescription={attributes.hotelContent.texts.descriptions.short}
location={attributes.location}
address={attributes.address}
tripAdvisor={attributes.ratings?.tripAdvisor}
hotelName={hotel.name}
hotelDescription={hotel.hotelContent.texts.descriptions.short}
location={hotel.location}
address={hotel.address}
tripAdvisor={hotel.ratings?.tripAdvisor}
/>
<SidePeeks />
<AmenitiesList detailedFacilities={attributes.detailedFacilities} />
<AmenitiesList detailedFacilities={hotel.detailedFacilities} />
</div>
<Rooms rooms={roomCategories} />
</main>