lbry-desktop/ui/component/settingStorage/index.js
jessopb 99ceaadf8b
add hosting to first run (#7598)
* add hosting to first run, enable auto hosting

* take welcomeVersion out of sync

* app strings fix

* recommended view hosting limit

* small changes

* fixes

* appstrings

* small fix
2022-06-02 15:24:11 -04:00

25 lines
1 KiB
JavaScript

import { connect } from 'react-redux';
import { doWalletStatus } from 'redux/actions/wallet';
import { doClearCache } from 'redux/actions/app';
import { doSetDaemonSetting, doClearDaemonSetting, doCleanBlobs } from 'redux/actions/settings';
import { selectDaemonSettings, selectDaemonStatus, selectSettingDaemonSettings } from 'redux/selectors/settings';
import SettingStorage from './view';
import { selectDiskSpace } from 'redux/selectors/app';
const select = (state) => ({
daemonSettings: selectDaemonSettings(state),
diskSpace: selectDiskSpace(state),
daemonStatus: selectDaemonStatus(state),
isSetting: selectSettingDaemonSettings(state),
});
const perform = (dispatch) => ({
setDaemonSetting: (key, value) => dispatch(doSetDaemonSetting(key, value)),
clearDaemonSetting: (key) => dispatch(doClearDaemonSetting(key)),
clearCache: () => dispatch(doClearCache()),
cleanBlobs: () => dispatch(doCleanBlobs()),
updateWalletStatus: () => dispatch(doWalletStatus()),
});
export default connect(select, perform)(SettingStorage);