Skip to content

Commit

Permalink
feat: add placeholder preview for payment preview when in build and c…
Browse files Browse the repository at this point in the history
…reate mode
  • Loading branch information
KenLSM committed Jul 10, 2023
1 parent 6c58e4c commit ad64b71
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ export const PaymentView = () => {
if (!paymentDetails.enabled && paymentState !== PaymentState.EditingPayment)
return null

const paymentDetailsWithPlaceholderPreview: typeof paymentDetails = {
...paymentDetails,
name: paymentDetails.name || 'Product/service name',
description: paymentDetails.description || 'Description',
}
return (
<Box w="100%" maxW="57rem" alignSelf="center" ref={paymentRef}>
<FormProvider {...formMethods}>
Expand All @@ -110,7 +115,7 @@ export const PaymentView = () => {
<Box p={{ base: '0.75rem', md: '1.5rem' }}>
<PaymentPreview
colorTheme={form?.startPage.colorTheme}
paymentDetails={paymentDetails}
paymentDetails={paymentDetailsWithPlaceholderPreview}
isBuilder
/>
</Box>
Expand Down

0 comments on commit ad64b71

Please sign in to comment.