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