Payment Modal: Close modal after receiving update (#2105)
This commit is contained in:
parent
389f86bf8f
commit
5313cc5c99
@ -138,6 +138,13 @@ const PaymentModal: FC<OwnProps & StateProps & GlobalStateProps> = ({
|
||||
}
|
||||
}, [isOpen, loadPasswordInfo, openModal]);
|
||||
|
||||
// Modal window can be closed by an event from the server side
|
||||
useEffect(() => {
|
||||
if (!isOpen && isModalOpen) {
|
||||
closeModal();
|
||||
}
|
||||
}, [closeModal, isModalOpen, isOpen]);
|
||||
|
||||
useEffect(() => {
|
||||
if (step !== undefined || error) {
|
||||
setIsLoading(false);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user