2019-06-17 16:32:38 -04:00
|
|
|
import { connect } from 'react-redux';
|
2020-06-15 16:33:03 -04:00
|
|
|
import { doUserResendVerificationEmail, doUserCheckEmailVerified, doFetchAccessToken } from 'redux/actions/user';
|
|
|
|
import { selectEmailToVerify, selectUser, selectAccessToken } from 'redux/selectors/user';
|
2019-06-17 16:32:38 -04:00
|
|
|
import UserEmailVerify from './view';
|
|
|
|
|
|
|
|
const select = state => ({
|
|
|
|
email: selectEmailToVerify(state),
|
|
|
|
user: selectUser(state),
|
2019-07-16 23:23:45 -04:00
|
|
|
accessToken: selectAccessToken(state),
|
2019-06-17 16:32:38 -04:00
|
|
|
});
|
|
|
|
|
|
|
|
const perform = dispatch => ({
|
|
|
|
resendVerificationEmail: email => dispatch(doUserResendVerificationEmail(email)),
|
|
|
|
checkEmailVerified: () => dispatch(doUserCheckEmailVerified()),
|
2019-07-16 23:23:45 -04:00
|
|
|
fetchAccessToken: () => dispatch(doFetchAccessToken()),
|
2019-06-17 16:32:38 -04:00
|
|
|
});
|
|
|
|
|
2020-04-13 15:16:07 -04:00
|
|
|
export default connect(select, perform)(UserEmailVerify);
|