1
0
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:
Matthias Kretschmann 2019-07-09 22:56:45 +02:00
parent c97876336a
commit 62c356d9e8
Signed by: m
GPG Key ID: 606EEEF3C479A91F

View File

@ -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) => {