From 1d11f8de8831bd3131df4a5b5d13908fac7f6f9c Mon Sep 17 00:00:00 2001 From: DhananjayPurohit Date: Thu, 14 Sep 2023 22:36:29 +0530 Subject: [PATCH] fix: close of create slot modal on slot details open --- src/view/Home.jsx | 6 ++++++ src/view/modals/CreateSlotModal.jsx | 1 + 2 files changed, 7 insertions(+) diff --git a/src/view/Home.jsx b/src/view/Home.jsx index 05fb082..76c36b3 100644 --- a/src/view/Home.jsx +++ b/src/view/Home.jsx @@ -38,6 +38,12 @@ class Home extends React.Component { toggleSlotDetailsModal = () => { this.setState({modalSlotDetails: !this.state.modalSlotDetails}); + this.setState({slot_details: { + auth_token: '', + slot_id: '', + expiry_date: '', + new_slot: true, + }}); }; setSlotDetails = (key, value) => { diff --git a/src/view/modals/CreateSlotModal.jsx b/src/view/modals/CreateSlotModal.jsx index 709feb3..972477e 100644 --- a/src/view/modals/CreateSlotModal.jsx +++ b/src/view/modals/CreateSlotModal.jsx @@ -97,6 +97,7 @@ class CreateSlotModal extends React.PureComponent { if (this.state.confirmed) { this.handleTokenForSpend(token_id); this.props.toggleSlotDetailsModal(); + this.handleModalClose(); } else { this.showErrorAlert('Payment not received yet'); }