diff --git a/src/renderer/component/userPhoneVerify/index.js b/src/renderer/component/userPhoneVerify/index.js index 89b18a120..fea5e2893 100644 --- a/src/renderer/component/userPhoneVerify/index.js +++ b/src/renderer/component/userPhoneVerify/index.js @@ -1,6 +1,6 @@ import React from 'react'; import { connect } from 'react-redux'; -import { doUserPhoneVerify } from 'redux/actions/user'; +import { doUserPhoneVerify, doUserPhoneReset } from 'redux/actions/user'; import { selectPhoneToVerify, selectPhoneVerifyErrorMessage, @@ -15,6 +15,7 @@ const select = state => ({ }); const perform = dispatch => ({ + resetPhone: () => dispatch(doUserPhoneReset()), verifyUserPhone: code => dispatch(doUserPhoneVerify(code)), }); diff --git a/src/renderer/component/userPhoneVerify/view.jsx b/src/renderer/component/userPhoneVerify/view.jsx index 027b18c38..2ee39c1e8 100644 --- a/src/renderer/component/userPhoneVerify/view.jsx +++ b/src/renderer/component/userPhoneVerify/view.jsx @@ -22,13 +22,22 @@ class UserPhoneVerify extends React.PureComponent { this.props.verifyUserPhone(code); } + reset() { + const { resetPhone } = this.props; + resetPhone(); + } + render() { const { cancelButton, phoneErrorMessage, phone, countryCode } = this.props; return (