This commit is contained in:
Daniil Chemerkin 2024-12-31 01:24:58 +00:00
parent 037d718d5a
commit 8f3bd14ee7
2 changed files with 2 additions and 3 deletions

View File

@ -72,10 +72,10 @@ function TrialPaymentPage() {
}, [isPaymentSuccess])
useEffect(() => {
if (isModalClosed) {
if (isModalClosed && !isPaymentSuccess && !isLoading) {
return handleDiscount()
}
}, [isModalClosed])
}, [isModalClosed, isPaymentSuccess, isLoading])
useEffect(() => {
if (error?.length && error !== "Product not found") {

View File

@ -78,7 +78,6 @@ export const usePayment = ({ placementKey, activeProduct }: IUsePaymentProps) =>
const finishSubmit = async (response: any) => {
try {
console.log("response: ", response);
setIsSubmitting(true);
const res = await api.makePayment({
token,