1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-04-01 01:18:10 +02:00
unleash.unleash/frontend/src/component/user/authentication-container.jsx
Ivar Conradi Østhus 5342c86b60 fix: one and only one front (#244)
Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>
Co-authored-by: Fredrik Strand Oseberg <fredrik.no@gmail.com>
2021-02-24 11:03:18 +01:00

18 lines
698 B
JavaScript

import { connect } from 'react-redux';
import AuthenticationComponent from './authentication-component';
import { insecureLogin, passwordLogin } from '../../store/user/actions';
import { loadInitialData } from './../../store/loader';
const mapDispatchToProps = (dispatch, props) => ({
insecureLogin: (path, user) => insecureLogin(path, user)(dispatch),
passwordLogin: (path, user) => passwordLogin(path, user)(dispatch),
loadInitialData: () => loadInitialData(props.flags)(dispatch),
});
const mapStateToProps = state => ({
user: state.user.toJS(),
flags: state.uiConfig.toJS().flags,
});
export default connect(mapStateToProps, mapDispatchToProps)(AuthenticationComponent);