Skip to content

Commit

Permalink
feat: add stripe crypto payment method (#2033)
Browse files Browse the repository at this point in the history
* refactor: extract set payment method

* feat: add crypto checkbox

* refactor: remove linter warnings and tailwind migration

* feat: display crypto in customer informations
  • Loading branch information
keellyp authored Feb 20, 2025
1 parent ac72d00 commit b780812
Show file tree
Hide file tree
Showing 5 changed files with 215 additions and 250 deletions.
4 changes: 3 additions & 1 deletion src/components/PaymentProviderChip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { tw } from '~/styles/utils'

interface PaymentProviderChipProps {
paymentProvider?: ProviderTypeEnum | 'manual' | 'manual_long'
label?: string
className?: string
}

Expand All @@ -35,6 +36,7 @@ const providers: Record<ProviderTypeEnum, { icon: JSX.Element; label: string }>

export const PaymentProviderChip: FC<PaymentProviderChipProps> = ({
paymentProvider,
label,
className,
}) => {
const { translate } = useInternationalization()
Expand All @@ -57,7 +59,7 @@ export const PaymentProviderChip: FC<PaymentProviderChipProps> = ({
)}
</Avatar>
<Typography variant="body" color="textSecondary" noWrap>
{isManual ? translate(manualLabel) : translate(providers[paymentProvider].label)}
{isManual ? translate(manualLabel) : (label ?? translate(providers[paymentProvider].label))}
</Typography>
</div>
)
Expand Down
Loading

0 comments on commit b780812

Please sign in to comment.