lbry-desktop/ui/component/settingAppearance/index.js
Byron Eric Perez f79c622edf
Added checkbox to enable/disable background (#7630)
* Added checkbox to enable/disable background

* bug fix in enable disable button

* small fix in translation

* rename background setting to be disable backgroud; add default value for background setting.
2022-06-28 16:01:19 -04:00

19 lines
864 B
JavaScript

import { connect } from 'react-redux';
import * as SETTINGS from 'constants/settings';
import { doSetClientSetting } from 'redux/actions/settings';
import { makeSelectClientSetting } from 'redux/selectors/settings';
import SettingAppearance from './view';
const select = (state) => ({
disableBackground: makeSelectClientSetting(SETTINGS.DISABLE_BACKGROUND)(state),
clock24h: makeSelectClientSetting(SETTINGS.CLOCK_24H)(state),
searchInLanguage: makeSelectClientSetting(SETTINGS.SEARCH_IN_LANGUAGE)(state),
hideBalance: makeSelectClientSetting(SETTINGS.HIDE_BALANCE)(state),
});
const perform = (dispatch) => ({
setClientSetting: (key, value) => dispatch(doSetClientSetting(key, value)),
setSearchInLanguage: (value) => dispatch(doSetClientSetting(SETTINGS.SEARCH_IN_LANGUAGE, value)),
});
export default connect(select, perform)(SettingAppearance);