lbry-desktop/src/renderer/component/userFieldVerify/index.js
2018-01-10 22:16:03 -08:00

22 lines
742 B
JavaScript

import React from 'react';
import { connect } from 'react-redux';
import { doUserFieldVerify, doUserFieldVerifyFailure } from 'redux/actions/user';
import {
selectEmailVerifyIsPending,
selectEmailToVerify,
selectEmailVerifyErrorMessage,
} from 'redux/selectors/user';
import UserFieldVerify from './view';
const select = state => ({
isPending: selectEmailVerifyIsPending(state),
email: selectEmailToVerify(state),
errorMessage: selectEmailVerifyErrorMessage(state),
});
const perform = dispatch => ({
verifyUserEmail: (code, recaptcha) => dispatch(doUserFieldVerify(code, recaptcha)),
verifyUserEmailFailure: error => dispatch(doUserFieldVerifyFailure(error)),
});
export default connect(select, perform)(UserFieldVerify);