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

29 lines
814 B
JavaScript

import { connect } from 'react-redux';
import {
selectEmailAlreadyExists,
selectEmailToVerify,
doUserResendVerificationEmail,
doUserCheckEmailVerified,
selectUser,
selectResendingVerificationEmail,
} from 'lbryinc';
import { doToast } from 'lbry-redux';
import UserEmailVerify from './view';
const select = state => ({
email: selectEmailToVerify(state),
isReturningUser: selectEmailAlreadyExists(state),
user: selectUser(state),
resendingEmail: selectResendingVerificationEmail(state),
});
const perform = dispatch => ({
resendVerificationEmail: email => dispatch(doUserResendVerificationEmail(email)),
checkEmailVerified: () => dispatch(doUserCheckEmailVerified()),
toast: message => dispatch(doToast({ message })),
});
export default connect(
select,
perform
)(UserEmailVerify);