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