diff --git a/components/ContentType/HotelPage/index.tsx b/components/ContentType/HotelPage/index.tsx index f5acca331..09143ce01 100644 --- a/components/ContentType/HotelPage/index.tsx +++ b/components/ContentType/HotelPage/index.tsx @@ -12,42 +12,43 @@ import SidePeek from "@/components/TempDesignSystem/SidePeek" import { getIntl } from "@/i18n" import { getLang } from "@/i18n/serverContext" import { getRestaurantHeading } from "@/utils/facilityCards" +import { generateHotelSchema } from "@/utils/jsonSchemas" import DynamicMap from "./Map/DynamicMap" import MapCard from "./Map/MapCard" import MapWithCardWrapper from "./Map/MapWithCard" import MobileMapToggle from "./Map/MobileMapToggle" import StaticMap from "./Map/StaticMap" -import WellnessAndExerciseSidePeek from "./SidePeeks/WellnessAndExercise" import AmenitiesList from "./AmenitiesList" import Facilities from "./Facilities" import IntroSection from "./IntroSection" import PreviewImages from "./PreviewImages" import { Rooms } from "./Rooms" -import { AboutTheHotelSidePeek } from "./SidePeeks" +import { AboutTheHotelSidePeek, WellnessAndExerciseSidePeek } from "./SidePeeks" import TabNavigation from "./TabNavigation" import styles from "./hotelPage.module.css" import { FacilityCardTypeEnum } from "@/types/components/hotelPage/facilities" -import { HotelPageProps } from "@/types/components/hotelPage/hotelPage" +import type { HotelPageProps } from "@/types/components/hotelPage/hotelPage" import { HotelHashValues } from "@/types/components/hotelPage/tabNavigation" -import { Facility } from "@/types/hotel" +import type { Facility } from "@/types/hotel" export default async function HotelPage({ hotelId }: HotelPageProps) { - const googleMapsApiKey = env.GOOGLE_STATIC_MAP_KEY - const googleMapId = env.GOOGLE_DYNAMIC_MAP_ID const lang = getLang() const [intl, hotelPageData, hotelData] = await Promise.all([ getIntl(), getHotelPage(), getHotelData({ hotelId, language: lang }), ]) + const googleMapsApiKey = env.GOOGLE_STATIC_MAP_KEY + const googleMapId = env.GOOGLE_DYNAMIC_MAP_ID if (!hotelData?.data || !hotelPageData) { return notFound() } + const jsonSchema = generateHotelSchema(hotelData.data.attributes) const { faq, content } = hotelPageData const { name, @@ -103,6 +104,12 @@ export default async function HotelPage({ hotelId }: HotelPageProps) { return (
+