2019-11-18 19:30:15 +01:00
|
|
|
import { connect } from 'react-redux';
|
2021-10-17 10:36:14 +02:00
|
|
|
import * as SETTINGS from 'constants/settings';
|
2019-11-18 19:30:15 +01:00
|
|
|
import { doSetAutoLaunch } from 'redux/actions/settings';
|
2022-02-26 06:18:10 +01:00
|
|
|
import { selectClientSetting } 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';
|
|
|
|
|
2021-10-17 10:36:14 +02:00
|
|
|
const select = (state) => ({
|
2021-11-23 05:29:04 +01:00
|
|
|
autoLaunch: selectClientSetting(state, SETTINGS.AUTO_LAUNCH),
|
2019-11-18 19:30:15 +01:00
|
|
|
});
|
|
|
|
|
2021-10-17 10:36:14 +02:00
|
|
|
const perform = (dispatch) => ({
|
|
|
|
showToast: (options) => dispatch(doToast(options)),
|
|
|
|
setAutoLaunch: (value) => dispatch(doSetAutoLaunch(value)),
|
2019-11-18 19:30:15 +01:00
|
|
|
});
|
|
|
|
|
2020-06-12 22:44:25 +02:00
|
|
|
export default connect(select, perform)(SettingAutoLaunch);
|