lbry-desktop/ui/component/userEmail/index.js

19 lines
722 B
JavaScript
Raw Normal View History

2019-06-17 22:32:38 +02:00
import { connect } from 'react-redux';
import { doUserResendVerificationEmail, doUserCheckEmailVerified, doFetchAccessToken } from 'redux/actions/user';
import { selectEmailToVerify, selectUser, selectAccessToken } from 'redux/selectors/user';
2019-06-17 22:32:38 +02:00
import UserEmailVerify from './view';
const select = state => ({
email: selectEmailToVerify(state),
user: selectUser(state),
accessToken: selectAccessToken(state),
2019-06-17 22:32:38 +02:00
});
const perform = dispatch => ({
resendVerificationEmail: email => dispatch(doUserResendVerificationEmail(email)),
checkEmailVerified: () => dispatch(doUserCheckEmailVerified()),
fetchAccessToken: () => dispatch(doFetchAccessToken()),
2019-06-17 22:32:38 +02:00
});
export default connect(select, perform)(UserEmailVerify);