feat: add included param to hotel call, fetch room data, setup schema, use in hotelpage

This commit is contained in:
Chuma McPhoy
2024-07-10 13:41:39 +02:00
parent f71d0a07d5
commit 0697c8d9ef
15 changed files with 191 additions and 162 deletions
+3 -1
View File
@@ -1,6 +1,6 @@
import { z } from "zod"
import { getHotelDataSchema } from "@/server/routers/hotels/output"
import { getHotelDataSchema,RoomSchema } from "@/server/routers/hotels/output"
export type HotelData = z.infer<typeof getHotelDataSchema>
@@ -9,3 +9,5 @@ export type HotelAddress = HotelData["data"]["attributes"]["address"]
export type HotelLocation = HotelData["data"]["attributes"]["location"]
export type HotelTripAdvisor =
HotelData["data"]["attributes"]["ratings"]["tripAdvisor"]
export type RoomData = z.infer<typeof RoomSchema>