lbry-desktop/ui/component/userEmailReturning/index.js
2020-06-16 09:56:32 -04:00

25 lines
770 B
JavaScript

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