2019-06-17 22:32:38 +02:00
|
|
|
import { connect } from 'react-redux';
|
2020-06-15 22:33:03 +02:00
|
|
|
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),
|
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
|
|
|
});
|
|
|
|
|
2020-04-13 21:16:07 +02:00
|
|
|
export default connect(select, perform)(UserEmailVerify);
|