Feat/SW-1519 remove deprecated hotel data from schema
* feat(SW-1519): Removed displayWebpage from hotel schema * feat(SW-1519): Removed gallery from hotel schema * feat(SW-1519): Removed conferencesAndMeetings from hotel schema * feat(SW-1519): Removed healthAndWellness from hotel schema * feat(SW-1519): Removed restaurantImages from hotel schema * feat(SW-1519): Removed restaurantsOverviewPage from hotel schema Approved-by: Fredrik Thorsson Approved-by: Matilda Landström
This commit is contained in:
@@ -7,7 +7,7 @@ import type {
|
||||
WithContext,
|
||||
} from "schema-dts"
|
||||
|
||||
import type { Hotel } from "@/types/hotel"
|
||||
import type { HotelData } from "@/types/hotel"
|
||||
import type { Breadcrumbs } from "@/types/trpc/routers/contentstack/breadcrumbs"
|
||||
|
||||
export function generateBreadcrumbsSchema(breadcrumbs: Breadcrumbs) {
|
||||
@@ -32,10 +32,13 @@ export function generateBreadcrumbsSchema(breadcrumbs: Breadcrumbs) {
|
||||
}
|
||||
}
|
||||
|
||||
export function generateHotelSchema(hotel: Hotel) {
|
||||
export function generateHotelSchema(hotelData: HotelData) {
|
||||
const { hotel, additionalData } = hotelData
|
||||
const ratings = hotel.ratings?.tripAdvisor
|
||||
const checkinData = hotel.hotelFacts.checkin
|
||||
const image = hotel.gallery?.heroImages[0] || hotel.gallery?.smallerImages[0]
|
||||
const image =
|
||||
additionalData.gallery?.heroImages[0] ||
|
||||
additionalData.gallery?.smallerImages[0]
|
||||
const facilities = hotel.detailedFacilities
|
||||
const jsonLd: WithContext<HotelSchema> = {
|
||||
"@context": "https://schema.org",
|
||||
|
||||
Reference in New Issue
Block a user