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

18 lines
685 B
JavaScript
Raw Normal View History

import { connect } from 'react-redux';
import { SETTINGS } from 'lbry-redux';
import { doSetLanguage, doSetClientSetting } from 'redux/actions/settings';
2019-10-03 18:55:21 +02:00
import { makeSelectClientSetting } from 'redux/selectors/settings';
import SettingLanguage from './view';
const select = state => ({
language: makeSelectClientSetting(SETTINGS.LANGUAGE)(state),
searchInLanguage: makeSelectClientSetting(SETTINGS.SEARCH_IN_LANGUAGE)(state),
});
const perform = dispatch => ({
2019-11-05 19:54:58 +01:00
setLanguage: value => dispatch(doSetLanguage(value)),
setSearchInLanguage: value => dispatch(doSetClientSetting(SETTINGS.SEARCH_IN_LANGUAGE, value)),
});
export default connect(select, perform)(SettingLanguage);