2019-11-18 10:30:15 -08:00
|
|
|
import { connect } from 'react-redux';
|
2021-10-07 23:47:39 -04:00
|
|
|
import * as SETTINGS from 'constants/settings';
|
2019-11-18 10:30:15 -08:00
|
|
|
import { doSetAutoLaunch } from 'redux/actions/settings';
|
2020-11-20 08:21:31 -05:00
|
|
|
import { makeSelectClientSetting, selectLanguage } from 'redux/selectors/settings';
|
2020-06-12 16:44:25 -04:00
|
|
|
import { doToast } from 'redux/actions/notifications';
|
2019-11-18 10:30:15 -08:00
|
|
|
import SettingAutoLaunch from './view';
|
|
|
|
|
2021-10-07 23:47:39 -04:00
|
|
|
const select = (state) => ({
|
2019-11-18 10:30:15 -08:00
|
|
|
autoLaunch: makeSelectClientSetting(SETTINGS.AUTO_LAUNCH)(state),
|
2020-11-20 08:21:31 -05:00
|
|
|
language: selectLanguage(state),
|
2019-11-18 10:30:15 -08:00
|
|
|
});
|
|
|
|
|
2021-10-07 23:47:39 -04:00
|
|
|
const perform = (dispatch) => ({
|
|
|
|
showToast: (options) => dispatch(doToast(options)),
|
|
|
|
setAutoLaunch: (value) => dispatch(doSetAutoLaunch(value)),
|
2019-11-18 10:30:15 -08:00
|
|
|
});
|
|
|
|
|
2020-06-12 16:44:25 -04:00
|
|
|
export default connect(select, perform)(SettingAutoLaunch);
|