2019-11-18 19:30:15 +01:00
|
|
|
import { connect } from 'react-redux';
|
|
|
|
import * as SETTINGS from 'constants/settings';
|
|
|
|
import { doSetAutoLaunch } from 'redux/actions/settings';
|
|
|
|
import { makeSelectClientSetting } from 'redux/selectors/settings';
|
2020-06-12 22:44:25 +02:00
|
|
|
import { doToast } from 'redux/actions/notifications';
|
2019-11-18 19:30:15 +01:00
|
|
|
import SettingAutoLaunch from './view';
|
|
|
|
|
|
|
|
const select = state => ({
|
|
|
|
autoLaunch: makeSelectClientSetting(SETTINGS.AUTO_LAUNCH)(state),
|
2020-07-06 12:38:33 +02:00
|
|
|
language: makeSelectClientSetting(SETTINGS.LANGUAGE)(state),
|
2019-11-18 19:30:15 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
const perform = dispatch => ({
|
|
|
|
showToast: options => dispatch(doToast(options)),
|
|
|
|
setAutoLaunch: value => dispatch(doSetAutoLaunch(value)),
|
|
|
|
});
|
|
|
|
|
2020-06-12 22:44:25 +02:00
|
|
|
export default connect(select, perform)(SettingAutoLaunch);
|