Files
web/components/HotelReservation/EnterDetails/Payment/index.tsx
Tobias Johansson 9b90e99adf 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
2024-11-28 08:08:39 +00:00

28 lines
656 B
TypeScript

import { getSavedPaymentCardsSafely } from "@/lib/trpc/memoizedRequests"
import PaymentClient from "./PaymentClient"
import { PaymentProps } from "@/types/components/hotelReservation/selectRate/section"
export default async function Payment({
user,
roomPrice,
otherPaymentOptions,
mustBeGuaranteed,
supportedCards,
}: PaymentProps) {
const savedCreditCards = await getSavedPaymentCardsSafely({
supportedCards,
})
return (
<PaymentClient
user={user}
roomPrice={roomPrice}
otherPaymentOptions={otherPaymentOptions}
savedCreditCards={savedCreditCards}
mustBeGuaranteed={mustBeGuaranteed}
/>
)
}