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

22 lines
806 B
JavaScript
Raw Normal View History

2020-08-21 17:49:13 +02:00
import { connect } from 'react-redux';
import { selectFetchingClaimSearch } from 'redux/selectors/claims';
import { selectFollowedTags } from 'redux/selectors/tags';
import { selectClientSetting, selectShowMatureContent, selectLanguage } from 'redux/selectors/settings';
2020-09-15 15:54:05 +02:00
import { doSetClientSetting } from 'redux/actions/settings';
import * as SETTINGS from 'constants/settings';
import ClaimListHeader from './view';
2020-08-21 17:49:13 +02:00
2021-03-31 22:55:26 +02:00
const select = (state) => ({
2020-08-21 17:49:13 +02:00
followedTags: selectFollowedTags(state),
loading: selectFetchingClaimSearch(state),
2021-03-31 22:55:26 +02:00
showNsfw: selectShowMatureContent(state),
searchInLanguage: selectClientSetting(state, SETTINGS.SEARCH_IN_LANGUAGE),
languageSetting: selectLanguage(state),
2020-08-21 17:49:13 +02:00
});
const perform = {
doSetClientSetting,
};
export default connect(select, perform)(ClaimListHeader);