lbry-desktop/ui/component/settingSystem/index.js
2021-08-23 23:45:13 +08:00

16 lines
551 B
JavaScript

import { connect } from 'react-redux';
import { doClearCache } from 'redux/actions/app';
import { doSetDaemonSetting } from 'redux/actions/settings';
import { selectDaemonSettings } from 'redux/selectors/settings';
import SettingSystem from './view';
const select = (state) => ({
daemonSettings: selectDaemonSettings(state),
});
const perform = (dispatch) => ({
setDaemonSetting: (key, value) => dispatch(doSetDaemonSetting(key, value)),
clearCache: () => dispatch(doClearCache()),
});
export default connect(select, perform)(SettingSystem);