Skip to content

Commit

Permalink
fix: go to service Button (#131)
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinRohlf authored Nov 12, 2024
1 parent f269c64 commit a4b1d49
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion src/components/Asset/AssetActions/Download/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import { Signer } from 'ethers'
import SuccessConfetti from '@components/@shared/SuccessConfetti'
import Input from '@components/@shared/FormInput'
import ContractingProvider, { PAYMENT_MODES } from './ContractingProvider'
import Button from '@components/@shared/atoms/Button'

export default function Download({
accountId,
Expand Down Expand Up @@ -305,7 +306,28 @@ export default function Download({
size="large"
/>
)}
{!isInPurgatory && <PurchaseButton isValid={isValid} />}
{!isInPurgatory && (
<>
{asset?.metadata?.additionalInformation?.saas
?.paymentMode === PAYMENT_MODES.PAYPERUSE &&
asset?.metadata?.additionalInformation?.saas
?.redirectUrl && (
<div className={styles.payPerUseBtn}>
<Button
style="primary"
onClick={(e) => {
e.preventDefault()
redirectToSaasUrl()
}}
disabled={!isValid}
>
Go to service
</Button>
</div>
)}
<PurchaseButton isValid={isValid} />
</>
)}
<Field
component={Input}
name="termsAndConditions"
Expand Down

0 comments on commit a4b1d49

Please sign in to comment.