2019-11-18 10:30:15 -08:00
|
|
|
import { connect } from 'react-redux';
|
2020-07-10 17:04:36 -04:00
|
|
|
import { SETTINGS } from 'lbry-redux';
|
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';
|
|
|
|
|
|
|
|
const select = state => ({
|
|
|
|
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
|
|
|
});
|
|
|
|
|
|
|
|
const perform = dispatch => ({
|
|
|
|
showToast: options => dispatch(doToast(options)),
|
|
|
|
setAutoLaunch: value => dispatch(doSetAutoLaunch(value)),
|
|
|
|
});
|
|
|
|
|
2020-06-12 16:44:25 -04:00
|
|
|
export default connect(select, perform)(SettingAutoLaunch);
|