Skip to content

Commit

Permalink
fix: close of create slot modal on slot details open
Browse files Browse the repository at this point in the history
  • Loading branch information
DhananjayPurohit committed Sep 14, 2023
1 parent 59af1bb commit 1d11f8d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/view/Home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
1 change: 1 addition & 0 deletions src/view/modals/CreateSlotModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand Down

0 comments on commit 1d11f8d

Please sign in to comment.