lbry-desktop/ui/component/userEmailReturning/index.js
2020-09-10 14:20:02 -04:00

27 lines
832 B
JavaScript

import { connect } from 'react-redux';
import {
selectEmailNewErrorMessage,
selectEmailToVerify,
selectEmailDoesNotExist,
selectEmailAlreadyExists,
selectUser,
selectEmailNewIsPending,
} from 'redux/selectors/user';
import { doUserCheckIfEmailExists, doClearEmailEntry } from 'redux/actions/user';
import { doSetSyncPref } from 'redux/actions/settings';
import UserEmailReturning from './view';
const select = state => ({
errorMessage: selectEmailNewErrorMessage(state),
emailToVerify: selectEmailToVerify(state),
emailDoesNotExist: selectEmailDoesNotExist(state),
emailExists: selectEmailAlreadyExists(state),
isPending: selectEmailNewIsPending(state),
user: selectUser(state),
});
export default connect(select, {
doUserCheckIfEmailExists,
doClearEmailEntry,
doSetSyncPref,
})(UserEmailReturning);