mirror of
https://github.com/oceanprotocol/commons.git
synced 2023-03-15 18:03:00 +01:00
reset report state on modal close
This commit is contained in:
parent
c97876336a
commit
62c356d9e8
@ -44,6 +44,17 @@ export default class Report extends PureComponent<
|
||||
|
||||
private toggleModal = () => {
|
||||
this.setState({ isModalOpen: !this.state.isModalOpen })
|
||||
this.state.isModalOpen && this.reset()
|
||||
}
|
||||
|
||||
private reset() {
|
||||
this.setState({
|
||||
comment: '',
|
||||
message: 'Sending...',
|
||||
isSending: false,
|
||||
hasError: false,
|
||||
hasSuccess: false
|
||||
})
|
||||
}
|
||||
|
||||
private sendEmail = async (event: Event) => {
|
||||
|
Loading…
Reference in New Issue
Block a user