2018-01-22 08:09:11 +01:00
|
|
|
import { connect } from 'react-redux';
|
|
|
|
import {
|
2018-09-24 05:44:42 +02:00
|
|
|
doUserPhoneVerify,
|
|
|
|
doUserPhoneReset,
|
2018-01-22 08:09:11 +01:00
|
|
|
selectPhoneToVerify,
|
|
|
|
selectPhoneVerifyErrorMessage,
|
|
|
|
selectUserCountryCode,
|
2018-09-24 05:44:42 +02:00
|
|
|
} from 'lbryinc';
|
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)),
|
|
|
|
});
|
|
|
|
|
2018-09-24 05:44:42 +02:00
|
|
|
export default connect(
|
|
|
|
select,
|
|
|
|
perform
|
|
|
|
)(UserPhoneVerify);
|