cspace-ui
Version:
CollectionSpace user interface for browsers
27 lines (22 loc) • 552 B
JavaScript
import { connect } from 'react-redux';
import LoginForm from '../../components/login/LoginForm';
import { login } from '../../actions/login';
import {
getLoginUsername,
isLoginPending,
isLoginSuccess,
getLoginError,
} from '../../reducers';
const mapStateToProps = state => ({
isPending: isLoginPending(state),
isSuccess: isLoginSuccess(state),
username: getLoginUsername(state),
error: getLoginError(state),
});
const mapDispatchToProps = {
login,
};
export default connect(
mapStateToProps,
mapDispatchToProps
)(LoginForm);