fix: add wrapper function for caching

This commit is contained in:
Christel Westerberg
2024-11-25 13:47:25 +01:00
parent 503b0bf186
commit 8bfc4065ed
7 changed files with 55 additions and 53 deletions

View File

@@ -4,7 +4,7 @@ import {
getHotelData,
getPackages,
getProfileSafely,
getRoomAvailability,
getRoomsAvailability,
} from "@/lib/trpc/memoizedRequests"
import { safeTry } from "@/utils/safeTry"
@@ -57,7 +57,7 @@ export async function RoomsContainer({
)
const roomsAvailabilityPromise = safeTry(
getRoomAvailability({
getRoomsAvailability({
hotelId: hotelId,
roomStayStartDate: fromDateString,
roomStayEndDate: toDateString,