d7856b7618
default language functions bugfix1 bugfix2 bugfix4
17 lines
673 B
JavaScript
17 lines
673 B
JavaScript
import { connect } from 'react-redux';
|
|
import { SETTINGS } from 'lbry-redux';
|
|
import { doSetLanguage, doSetClientSetting } from 'redux/actions/settings';
|
|
import { makeSelectClientSetting, selectLanguage } from 'redux/selectors/settings';
|
|
import SettingLanguage from './view';
|
|
|
|
const select = state => ({
|
|
language: selectLanguage(state),
|
|
searchInLanguage: makeSelectClientSetting(SETTINGS.SEARCH_IN_LANGUAGE)(state),
|
|
});
|
|
|
|
const perform = dispatch => ({
|
|
setLanguage: value => dispatch(doSetLanguage(value)),
|
|
setSearchInLanguage: value => dispatch(doSetClientSetting(SETTINGS.SEARCH_IN_LANGUAGE, value)),
|
|
});
|
|
|
|
export default connect(select, perform)(SettingLanguage);
|