Improved some issues with the payment

This commit is contained in:
Tiago Ribeiro
2024-05-27 13:05:38 +01:00
parent 1f8e9106de
commit 4166781f7e
6 changed files with 47 additions and 63 deletions

View File

@@ -18,11 +18,10 @@ import PaymobPayment from "@/components/PaymobPayment";
interface Props {
user: User;
hasExpired?: boolean;
clientID: string;
reload: () => void;
}
export default function PaymentDue({user, hasExpired = false, clientID, reload}: Props) {
export default function PaymentDue({user, hasExpired = false, reload}: Props) {
const [isLoading, setIsLoading] = useState(false);
const [appliedDiscount, setAppliedDiscount] = useState(0);
@@ -136,7 +135,6 @@ export default function PaymentDue({user, hasExpired = false, clientID, reload}:
</div>
)}
<PaymobPayment
key={clientID}
user={user}
setIsPaymentLoading={setIsLoading}
onSuccess={() => {
@@ -176,7 +174,6 @@ export default function PaymentDue({user, hasExpired = false, clientID, reload}:
{user.corporateInformation.payment.value} {user.corporateInformation.payment.currency}
</span>
<PaymobPayment
key={clientID}
user={user}
setIsPaymentLoading={setIsLoading}
currency={user.corporateInformation.payment.currency}