Merged in feat/SW-1333-hotel-endpoint (pull request #1206)
Feat(SW-133): Add additionalData endpoint Approved-by: Erik Tiekstra Approved-by: Fredrik Thorsson
This commit is contained in:
@@ -41,7 +41,7 @@ import styles from "./hotelPage.module.css"
|
||||
import { FacilityCardTypeEnum } from "@/types/components/hotelPage/facilities"
|
||||
import type { HotelPageProps } from "@/types/components/hotelPage/hotelPage"
|
||||
import { HotelHashValues } from "@/types/components/hotelPage/tabNavigation"
|
||||
import type { Facility } from "@/types/hotel"
|
||||
import type { AdditionalData, Facility } from "@/types/hotel"
|
||||
import { PageContentTypeEnum } from "@/types/requests/contentType"
|
||||
|
||||
export default async function HotelPage({ hotelId }: HotelPageProps) {
|
||||
@@ -63,12 +63,7 @@ export default async function HotelPage({ hotelId }: HotelPageProps) {
|
||||
name,
|
||||
address,
|
||||
pointsOfInterest,
|
||||
gallery,
|
||||
specialAlerts,
|
||||
healthAndWellness,
|
||||
restaurantImages,
|
||||
conferencesAndMeetings,
|
||||
hotelRoomElevatorPitchText,
|
||||
hotelContent,
|
||||
detailedFacilities,
|
||||
healthFacilities,
|
||||
@@ -79,8 +74,18 @@ export default async function HotelPage({ hotelId }: HotelPageProps) {
|
||||
ratings,
|
||||
parking,
|
||||
} = hotelData.data.attributes
|
||||
const roomCategories = hotelData.included?.rooms || []
|
||||
const restaurants = hotelData.included?.restaurants || []
|
||||
const roomCategories = hotelData.included.rooms || []
|
||||
const restaurants = hotelData.included.restaurants || []
|
||||
const additionalData =
|
||||
hotelData.included.additionalData || ({} as AdditionalData)
|
||||
|
||||
const {
|
||||
healthAndWellness,
|
||||
restaurantImages,
|
||||
conferencesAndMeetings,
|
||||
hotelRoomElevatorPitchText,
|
||||
gallery,
|
||||
} = additionalData
|
||||
|
||||
const images = gallery?.smallerImages
|
||||
const description = hotelContent.texts.descriptions.medium
|
||||
|
||||
Reference in New Issue
Block a user