lbry-desktop/ui/component/settingAutoLaunch/index.js

19 lines
668 B
JavaScript
Raw Normal View History

2019-11-18 19:30:15 +01:00
import { connect } from 'react-redux';
import * as SETTINGS from 'constants/settings';
2019-11-18 19:30:15 +01:00
import { doSetAutoLaunch } from 'redux/actions/settings';
import { selectClientSetting, selectLanguage } from 'redux/selectors/settings';
import { doToast } from 'redux/actions/notifications';
2019-11-18 19:30:15 +01:00
import SettingAutoLaunch from './view';
const select = (state) => ({
autoLaunch: selectClientSetting(state, SETTINGS.AUTO_LAUNCH),
language: selectLanguage(state),
2019-11-18 19:30:15 +01:00
});
const perform = (dispatch) => ({
showToast: (options) => dispatch(doToast(options)),
setAutoLaunch: (value) => dispatch(doSetAutoLaunch(value)),
2019-11-18 19:30:15 +01:00
});
export default connect(select, perform)(SettingAutoLaunch);