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

23 lines
866 B
JavaScript
Raw Normal View History

2020-08-21 17:49:13 +02:00
import { connect } from 'react-redux';
import { selectFetchingClaimSearch, SETTINGS } from 'lbry-redux';
import { selectFollowedTags } from 'redux/selectors/tags';
2020-08-21 17:49:13 +02:00
import { doToggleTagFollowDesktop } from 'redux/actions/tags';
import { makeSelectClientSetting } from 'redux/selectors/settings';
2020-09-15 15:54:05 +02:00
import { doSetClientSetting } from 'redux/actions/settings';
2020-08-21 17:49:13 +02:00
import ClaimListDiscover from './view';
const select = state => ({
followedTags: selectFollowedTags(state),
loading: selectFetchingClaimSearch(state),
showNsfw: makeSelectClientSetting(SETTINGS.SHOW_MATURE)(state),
searchInLanguage: makeSelectClientSetting(SETTINGS.SEARCH_IN_LANGUAGE)(state),
languageSetting: makeSelectClientSetting(SETTINGS.LANGUAGE)(state),
2020-08-21 17:49:13 +02:00
});
const perform = {
doToggleTagFollowDesktop,
doSetClientSetting,
};
export default connect(select, perform)(ClaimListDiscover);