🚸 (payment) Improve payment default currency be…
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
import { Text } from '@chakra-ui/react'
|
||||
import { useTranslate } from '@tolgee/react'
|
||||
import { PaymentInputBlock } from '@typebot.io/schemas'
|
||||
import { defaultPaymentInputOptions } from '@typebot.io/schemas/features/blocks/inputs/payment/constants'
|
||||
|
||||
type Props = {
|
||||
block: PaymentInputBlock
|
||||
@ -9,11 +10,7 @@ type Props = {
|
||||
export const PaymentInputContent = ({ block }: Props) => {
|
||||
const { t } = useTranslate()
|
||||
|
||||
if (
|
||||
!block.options?.amount ||
|
||||
!block.options.credentialsId ||
|
||||
!block.options.currency
|
||||
)
|
||||
if (!block.options?.amount || !block.options.credentialsId)
|
||||
return (
|
||||
<Text color="gray.500">
|
||||
{t('blocks.inputs.payment.placeholder.label')}
|
||||
@ -22,7 +19,7 @@ export const PaymentInputContent = ({ block }: Props) => {
|
||||
return (
|
||||
<Text noOfLines={1} pr="6">
|
||||
{t('blocks.inputs.payment.collect.label')} {block.options.amount}{' '}
|
||||
{block.options.currency}
|
||||
{block.options.currency ?? defaultPaymentInputOptions.currency}
|
||||
</Text>
|
||||
)
|
||||
}
|
||||
|
@ -163,6 +163,7 @@ export const StripeConfigModal = ({
|
||||
placeholder="sk_test_..."
|
||||
withVariableButton={false}
|
||||
debounceTimeout={0}
|
||||
type="password"
|
||||
/>
|
||||
</HStack>
|
||||
</Stack>
|
||||
@ -187,6 +188,7 @@ export const StripeConfigModal = ({
|
||||
placeholder="sk_live_..."
|
||||
withVariableButton={false}
|
||||
debounceTimeout={0}
|
||||
type="password"
|
||||
/>
|
||||
</FormControl>
|
||||
</HStack>
|
||||
|
@ -143,7 +143,7 @@
|
||||
"blocks.inputs.file.settings.skip.label": "Skip button label:",
|
||||
"blocks.inputs.fileUpload.blockCard.tooltip": "Upload Files",
|
||||
"blocks.inputs.number.settings.step.label": "Step:",
|
||||
"blocks.inputs.payment.collect.label": "Coletar",
|
||||
"blocks.inputs.payment.collect.label": "Collect",
|
||||
"blocks.inputs.payment.placeholder.label": "Configure...",
|
||||
"blocks.inputs.payment.settings.account.label": "Account:",
|
||||
"blocks.inputs.payment.settings.accountText.label": "{provider} account",
|
||||
|
Reference in New Issue
Block a user