2020-04-13 21:16:07 +02:00
|
|
|
import { connect } from 'react-redux';
|
2020-06-15 22:33:03 +02:00
|
|
|
import { selectUser, selectPasswordSetSuccess, selectPasswordSetError } from 'redux/selectors/user';
|
2020-07-06 12:38:33 +02:00
|
|
|
import { makeSelectClientSetting } from 'redux/selectors/settings';
|
2020-06-15 22:33:03 +02:00
|
|
|
import { doUserPasswordSet, doClearPasswordEntry } from 'redux/actions/user';
|
2020-06-12 22:44:25 +02:00
|
|
|
import { doToast } from 'redux/actions/notifications';
|
2020-04-13 21:16:07 +02:00
|
|
|
import UserSignIn from './view';
|
2020-07-06 12:38:33 +02:00
|
|
|
import * as SETTINGS from 'constants/settings';
|
2020-04-13 21:16:07 +02:00
|
|
|
|
|
|
|
const select = state => ({
|
|
|
|
user: selectUser(state),
|
|
|
|
passwordSetSuccess: selectPasswordSetSuccess(state),
|
|
|
|
passwordSetError: selectPasswordSetError(state),
|
2020-07-06 12:38:33 +02:00
|
|
|
language: makeSelectClientSetting(SETTINGS.LANGUAGE)(state),
|
2020-04-13 21:16:07 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
export default connect(select, {
|
|
|
|
doUserPasswordSet,
|
|
|
|
doToast,
|
|
|
|
doClearPasswordEntry,
|
|
|
|
})(UserSignIn);
|