fix: cache hotel response

This commit is contained in:
Simon Emanuelsson
2024-12-17 16:18:46 +01:00
parent 13a164242f
commit 1deab000bd
38 changed files with 339 additions and 246 deletions

View File

@@ -1,3 +1,3 @@
import { passwordValidators } from "@/utils/passwordValidator"
import type { passwordValidators } from "@/utils/zod/passwordValidator"
export type PasswordValidatorKey = keyof typeof passwordValidators

View File

@@ -1,9 +1,5 @@
import type {
Hotel,
Restaurant,
RestaurantOpeningHours,
} from "@/types/hotel"
import type { ParkingAmenityProps } from "./parking"
import type { Hotel, Restaurant, RestaurantOpeningHours } from "@/types/hotel"
export type AmenitiesSidePeekProps = {
amenitiesList: Hotel["detailedFacilities"]

View File

@@ -8,7 +8,6 @@ import type {
import type { packagePriceSchema } from "@/server/routers/hotels/schemas/packages"
import type { RoomPriceSchema } from "./flexibilityOption"
import type { RoomPackageCodes, RoomPackages } from "./roomFilter"
import type { RateCode } from "./selectRate"
export type RoomCardProps = {
hotelId: string
@@ -19,7 +18,6 @@ export type RoomCardProps = {
selectedPackages: RoomPackageCodes[]
roomListIndex: number
packages: RoomPackages | undefined
handleSelectRate: React.Dispatch<React.SetStateAction<RateCode | undefined>>
}
type RoomPackagePriceSchema = z.output<typeof packagePriceSchema>

View File

@@ -1,17 +1,15 @@
import type { Room } from "@/types/hotel"
import type { RoomsAvailability } from "@/types/trpc/routers/hotel/roomAvailability"
import type {
DefaultFilterOptions,
RoomPackage,
RoomPackageCodes,
RoomPackages,
} from "./roomFilter"
import type { Room } from "@/types/hotel"
import type { RoomsAvailability } from "@/types/trpc/routers/hotel/roomAvailability"
export interface RoomTypeListProps {
roomsAvailability: RoomsAvailability
roomCategories: Room[]
availablePackages: RoomPackage | undefined
availablePackages: RoomPackages | undefined
selectedPackages: RoomPackageCodes[]
hotelType: string | undefined
roomListIndex: number
@@ -27,7 +25,7 @@ export interface SelectRateProps {
export interface RoomSelectionPanelProps {
roomCategories: Room[]
availablePackages: RoomPackage[]
availablePackages: RoomPackages
selectedPackages: RoomPackageCodes[]
hotelType: string | undefined
defaultPackages: DefaultFilterOptions[]