import { cache } from "react" import { serverClient } from "../../trpc" import type { GetSavedPaymentCardsInput } from "@scandic-hotels/trpc/routers/user/input" export const getSavedPaymentCardsSafely = cache( async function getMemoizedSavedPaymentCardsSafely( input: GetSavedPaymentCardsInput ) { const caller = await serverClient() return caller.user.safePaymentCards(input) } )