lbry-desktop/ui/component/userPhoneVerify/index.js
2019-11-11 13:27:29 -05:00

25 lines
612 B
JavaScript

import { connect } from 'react-redux';
import {
doUserPhoneVerify,
doUserPhoneReset,
selectPhoneToVerify,
selectPhoneVerifyErrorMessage,
selectUserCountryCode,
} from 'lbryinc';
import UserPhoneVerify from './view';
const select = state => ({
phone: selectPhoneToVerify(state),
countryCode: selectUserCountryCode(state),
phoneErrorMessage: selectPhoneVerifyErrorMessage(state),
});
const perform = dispatch => ({
resetPhone: () => dispatch(doUserPhoneReset()),
verifyUserPhone: code => dispatch(doUserPhoneVerify(code)),
});
export default connect(
select,
perform
)(UserPhoneVerify);