Skip to content

Commit

Permalink
fix(billing): buy credits button instead of link
Browse files Browse the repository at this point in the history
refs #628
  • Loading branch information
jzsfkzm committed Feb 21, 2025
1 parent 92b328c commit ce9ae0e
Showing 1 changed file with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import { ReactNode, useEffect, useRef, useState } from "react";
import { Controller, useForm } from "react-hook-form";
import {
ActionButton,
Alert,
CheckboxWithLabel,
Form,
Expand Down Expand Up @@ -230,6 +231,14 @@ export const DeploymentDepositModal: React.FunctionComponent<DeploymentDepositMo
side: "left",
onClick: onClose
},
...(isManaged ? [{
label: "Buy credits",
color: "primary",
variant: "ghost",
side: "right",
onClick: closePopupAndGoToCheckoutIfPossible,
"data-testid": "deposit-modal-buy-credits-button"
}] : []),
{
label: "Continue",
color: "secondary",
Expand All @@ -240,7 +249,7 @@ export const DeploymentDepositModal: React.FunctionComponent<DeploymentDepositMo
onClick: onDepositClick,
"data-testid": "deposit-modal-continue-button"
}
]}
] as ActionButton[]}
onClose={onClose}
enableCloseOnBackdropClick
title={title}
Expand Down Expand Up @@ -295,13 +304,6 @@ export const DeploymentDepositModal: React.FunctionComponent<DeploymentDepositMo
);
}}
/>
{isManaged && (
<div className="mt-1 flex justify-end text-xs">
<LinkTo onClick={closePopupAndGoToCheckoutIfPossible} className="text-primary">
Buy more credits
</LinkTo>
</div>
)}
</div>

{isCustodial && (
Expand Down

0 comments on commit ce9ae0e

Please sign in to comment.