2018-01-22 08:09:11 +01:00
|
|
|
import { connect } from 'react-redux';
|
2020-06-15 22:33:03 +02:00
|
|
|
import { doUserPhoneVerify, doUserPhoneReset } from 'redux/actions/user';
|
|
|
|
import { selectPhoneToVerify, selectPhoneVerifyErrorMessage, selectUserCountryCode } from 'redux/selectors/user';
|
2018-01-22 08:09:11 +01:00
|
|
|
import UserPhoneVerify from './view';
|
|
|
|
|
|
|
|
const select = state => ({
|
|
|
|
phone: selectPhoneToVerify(state),
|
|
|
|
countryCode: selectUserCountryCode(state),
|
|
|
|
phoneErrorMessage: selectPhoneVerifyErrorMessage(state),
|
|
|
|
});
|
|
|
|
|
|
|
|
const perform = dispatch => ({
|
2018-01-23 00:26:34 +01:00
|
|
|
resetPhone: () => dispatch(doUserPhoneReset()),
|
2018-01-22 08:09:11 +01:00
|
|
|
verifyUserPhone: code => dispatch(doUserPhoneVerify(code)),
|
|
|
|
});
|
|
|
|
|
2020-06-15 22:33:03 +02:00
|
|
|
export default connect(select, perform)(UserPhoneVerify);
|