2021-08-09 02:36:42 +02:00
|
|
|
import { connect } from 'react-redux';
|
|
|
|
import { SETTINGS } from 'lbry-redux';
|
|
|
|
import { doSetClientSetting } from 'redux/actions/settings';
|
2021-08-09 07:50:11 +02:00
|
|
|
import { selectLanguage, makeSelectClientSetting } from 'redux/selectors/settings';
|
2021-08-09 02:36:42 +02:00
|
|
|
|
|
|
|
import SettingUnauthenticated from './view';
|
|
|
|
|
|
|
|
const select = (state) => ({
|
|
|
|
searchInLanguage: makeSelectClientSetting(SETTINGS.SEARCH_IN_LANGUAGE)(state),
|
2021-08-09 07:50:11 +02:00
|
|
|
language: selectLanguage(state),
|
2021-08-09 02:36:42 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
const perform = (dispatch) => ({
|
|
|
|
setSearchInLanguage: (value) => dispatch(doSetClientSetting(SETTINGS.SEARCH_IN_LANGUAGE, value)),
|
|
|
|
});
|
|
|
|
|
|
|
|
export default connect(select, perform)(SettingUnauthenticated);
|