Jelajahi Sumber

Fix state setting on subscriber modal unmount

Kailash Nadh 6 tahun lalu
induk
melakukan
72cf9e2d9b
1 mengubah file dengan 0 tambahan dan 2 penghapusan
  1. 0 2
      frontend/my/src/Subscribers.js

+ 0 - 2
frontend/my/src/Subscribers.js

@@ -59,7 +59,6 @@ class CreateFormDef extends React.PureComponent {
                 notification["success"]({ message: "Subscriber added", description: `${values["email"]} added` })
                 this.props.fetchRecords()
                 this.props.onClose()
-                this.setState({ modalWaiting: false })
             }).catch(e => {
                 notification["error"]({ message: "Error", description: e.message })
                 this.setState({ modalWaiting: false })
@@ -74,7 +73,6 @@ class CreateFormDef extends React.PureComponent {
                 // Reload the table.
                 this.props.fetchRecords()
                 this.props.onClose()
-                this.setState({ modalWaiting: false })
             }).catch(e => {
                 notification["error"]({ message: "Error", description: e.message })
                 this.setState({ modalWaiting: false })