2020-04-13 21:16:07 +02:00
|
|
|
import { connect } from 'react-redux';
|
|
|
|
import {
|
|
|
|
selectEmailNewErrorMessage,
|
|
|
|
selectEmailToVerify,
|
|
|
|
selectEmailDoesNotExist,
|
|
|
|
selectEmailAlreadyExists,
|
2020-04-20 22:53:40 +02:00
|
|
|
selectUser,
|
2020-07-09 18:50:11 +02:00
|
|
|
selectEmailNewIsPending,
|
2020-06-15 22:33:03 +02:00
|
|
|
} from 'redux/selectors/user';
|
|
|
|
import { doUserCheckIfEmailExists, doClearEmailEntry } from 'redux/actions/user';
|
2020-09-04 17:02:30 +02:00
|
|
|
import { doSetSyncPref } from 'redux/actions/settings';
|
2020-04-13 21:16:07 +02:00
|
|
|
import UserEmailReturning from './view';
|
|
|
|
|
|
|
|
const select = state => ({
|
|
|
|
errorMessage: selectEmailNewErrorMessage(state),
|
|
|
|
emailToVerify: selectEmailToVerify(state),
|
|
|
|
emailDoesNotExist: selectEmailDoesNotExist(state),
|
|
|
|
emailExists: selectEmailAlreadyExists(state),
|
2020-07-09 18:50:11 +02:00
|
|
|
isPending: selectEmailNewIsPending(state),
|
2020-04-20 22:53:40 +02:00
|
|
|
user: selectUser(state),
|
2020-04-13 21:16:07 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
export default connect(select, {
|
|
|
|
doUserCheckIfEmailExists,
|
|
|
|
doClearEmailEntry,
|
2020-09-04 17:02:30 +02:00
|
|
|
doSetSyncPref,
|
2020-04-13 21:16:07 +02:00
|
|
|
})(UserEmailReturning);
|