import { cache } from "react" import { serverClient } from "../../trpc" import type { HotelInput } from "@scandic-hotels/trpc/types/hotel" export const getHotel = cache(async function getMemoizedHotelData( input: HotelInput ) { if (!input.isCardOnlyPayment) { input.isCardOnlyPayment = false } const caller = await serverClient() return caller.hotel.get(input) })