lbry-desktop/ui/component/settingClosingBehavior/index.js
2020-08-20 01:16:11 -04:00

15 lines
549 B
JavaScript

import { connect } from 'react-redux';
import { SETTINGS } from 'lbry-redux';
import { doSetAppToTrayWhenClosed } from 'redux/actions/settings';
import { makeSelectClientSetting } from 'redux/selectors/settings';
import SettingClosingBehavior from './view';
const select = state => ({
toTrayWhenClosed: makeSelectClientSetting(SETTINGS.TO_TRAY_WHEN_CLOSED)(state),
});
const perform = dispatch => ({
setToTrayWhenClosed: value => dispatch(doSetAppToTrayWhenClosed(value)),
});
export default connect(select, perform)(SettingClosingBehavior);