3c4ccdd2fe
## Why - No memo required (no transformation). - `makeSelect*` is an incorrect pattern. ## Changes - Replaced makeSelectClientSetting with selectClientSetting. - Remove unused selectShowRepostedContent.
17 lines
624 B
JavaScript
17 lines
624 B
JavaScript
import { connect } from 'react-redux';
|
|
import * as SETTINGS from 'constants/settings';
|
|
import { doSetClientSetting } from 'redux/actions/settings';
|
|
import { selectLanguage, selectClientSetting } from 'redux/selectors/settings';
|
|
|
|
import SettingUnauthenticated from './view';
|
|
|
|
const select = (state) => ({
|
|
searchInLanguage: selectClientSetting(state, SETTINGS.SEARCH_IN_LANGUAGE),
|
|
language: selectLanguage(state),
|
|
});
|
|
|
|
const perform = (dispatch) => ({
|
|
setSearchInLanguage: (value) => dispatch(doSetClientSetting(SETTINGS.SEARCH_IN_LANGUAGE, value)),
|
|
});
|
|
|
|
export default connect(select, perform)(SettingUnauthenticated);
|