fix(SW-96): remove improper use of hotel get

This commit is contained in:
Chuma McPhoy
2024-08-30 09:43:19 +02:00
parent 985e3c45c5
commit ad088ee7f5
2 changed files with 5 additions and 11 deletions

View File

@@ -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",

View File

@@ -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"