feat(SW-159): merged contentstack and api requests for hotel query
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
import { serverClient } from "@/lib/trpc/server"
|
||||
|
||||
import { getLang } from "@/i18n/serverContext"
|
||||
|
||||
import { MOCK_FACILITIES } from "./Facilities/mockData"
|
||||
import AmenitiesList from "./AmenitiesList"
|
||||
import Facilities from "./Facilities"
|
||||
@@ -13,17 +11,7 @@ import TabNavigation from "./TabNavigation"
|
||||
import styles from "./hotelPage.module.css"
|
||||
|
||||
export default async function HotelPage() {
|
||||
const hotelPageIdentifierData =
|
||||
await serverClient().contentstack.hotelPage.get()
|
||||
|
||||
if (!hotelPageIdentifierData) {
|
||||
return null
|
||||
}
|
||||
const lang = getLang()
|
||||
|
||||
const hotelData = await serverClient().hotel.get({
|
||||
hotelId: hotelPageIdentifierData.hotel_page_id,
|
||||
language: lang,
|
||||
include: ["RoomCategories"],
|
||||
})
|
||||
if (!hotelData) {
|
||||
|
||||
Reference in New Issue
Block a user