fix(SW-96): remove improper use of hotel get
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { notFound } from "next/navigation"
|
||||
|
||||
import { serverClient } from "@/lib/trpc/server"
|
||||
import tempHotelData from "@/server/routers/hotels/tempHotelData.json"
|
||||
|
||||
import HotelCard from "@/components/HotelReservation/HotelCard"
|
||||
import BedSelection from "@/components/HotelReservation/SelectRate/BedSelection"
|
||||
@@ -80,15 +81,9 @@ export default async function SectionsPage({
|
||||
}: PageArgs<LangParams & { section: string }, SectionPageProps>) {
|
||||
setLang(params.lang)
|
||||
|
||||
// TODO: pass the correct hotel ID
|
||||
const hotelResponse = await serverClient().hotel.get({
|
||||
hotelId: "879",
|
||||
language: params.lang,
|
||||
})
|
||||
if (!hotelResponse) {
|
||||
return notFound()
|
||||
}
|
||||
const { hotel } = hotelResponse
|
||||
// TODO: Use real endpoint.
|
||||
const hotel = tempHotelData.data.attributes
|
||||
|
||||
const rooms = await serverClient().hotel.rates.get({
|
||||
// TODO: pass the correct hotel ID and all other parameters that should be included in the search
|
||||
hotelId: "1",
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
import { serverClient } from "@/lib/trpc/server"
|
||||
|
||||
import { MOCK_FACILITIES } from "./Facilities/mockData"
|
||||
import Facilities from "./Facilities"
|
||||
|
||||
import AmenitiesList from "./AmenitiesList"
|
||||
import Facilities from "./Facilities"
|
||||
import IntroSection from "./IntroSection"
|
||||
import PreviewImages from "./PreviewImages"
|
||||
import { Rooms } from "./Rooms"
|
||||
|
||||
Reference in New Issue
Block a user