lbry-desktop/ui/component/claimListHeader/index.js
infinite-persistence 3c4ccdd2fe
Kill makeSelectClientSetting
## Why
- No memo required (no transformation).
- `makeSelect*` is an incorrect pattern.

## Changes
- Replaced makeSelectClientSetting with selectClientSetting.
- Remove unused selectShowRepostedContent.
2021-11-23 12:29:53 +08:00

23 lines
897 B
JavaScript

import { connect } from 'react-redux';
import { selectFetchingClaimSearch } from 'redux/selectors/claims';
import { selectFollowedTags } from 'redux/selectors/tags';
import { doToggleTagFollowDesktop } from 'redux/actions/tags';
import { selectClientSetting, selectShowMatureContent, selectLanguage } from 'redux/selectors/settings';
import { doSetClientSetting } from 'redux/actions/settings';
import * as SETTINGS from 'constants/settings';
import ClaimListHeader from './view';
const select = (state) => ({
followedTags: selectFollowedTags(state),
loading: selectFetchingClaimSearch(state),
showNsfw: selectShowMatureContent(state),
searchInLanguage: selectClientSetting(state, SETTINGS.SEARCH_IN_LANGUAGE),
languageSetting: selectLanguage(state),
});
const perform = {
doToggleTagFollowDesktop,
doSetClientSetting,
};
export default connect(select, perform)(ClaimListHeader);