Merged in feat/SW-1007-saved-cards-filtering (pull request #980)
Feat/SW-1007 saved payment cards now shown based on supported cards by hotel * fix(SW-1007): refactored savedCards to only show supported payment cards * fix(SW-1007): show error message even if metadata is null * fix: merge changes that were missed * fix: remove use server Approved-by: Christel Westerberg
This commit is contained in:
@@ -13,6 +13,7 @@ import type {
|
||||
GetSelectedRoomAvailabilityInput,
|
||||
HotelDataInput,
|
||||
} from "@/server/routers/hotels/input"
|
||||
import type { GetSavedPaymentCardsInput } from "@/server/routers/user/input"
|
||||
|
||||
export const getLocations = cache(async function getMemoizedLocations() {
|
||||
return serverClient().hotel.locations.get()
|
||||
@@ -32,9 +33,11 @@ export const getProfileSafely = cache(
|
||||
}
|
||||
)
|
||||
|
||||
export const getCreditCardsSafely = cache(
|
||||
async function getMemoizedCreditCardsSafely() {
|
||||
return serverClient().user.safeCreditCards()
|
||||
export const getSavedPaymentCardsSafely = cache(
|
||||
async function getMemoizedSavedPaymentCardsSafely(
|
||||
args: GetSavedPaymentCardsInput
|
||||
) {
|
||||
return serverClient().user.safePaymentCards(args)
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user