2020-08-21 11:49:13 -04:00
|
|
|
import { connect } from 'react-redux';
|
2020-10-05 14:31:51 -04:00
|
|
|
import { selectFetchingClaimSearch, SETTINGS } from 'lbry-redux';
|
|
|
|
import { selectFollowedTags } from 'redux/selectors/tags';
|
2020-08-21 11:49:13 -04:00
|
|
|
import { doToggleTagFollowDesktop } from 'redux/actions/tags';
|
|
|
|
import { makeSelectClientSetting } from 'redux/selectors/settings';
|
2020-09-15 09:54:05 -04:00
|
|
|
import { doSetClientSetting } from 'redux/actions/settings';
|
2020-11-10 11:07:00 -05:00
|
|
|
import ClaimListHeader from './view';
|
2020-08-21 11:49:13 -04:00
|
|
|
|
|
|
|
const select = state => ({
|
|
|
|
followedTags: selectFollowedTags(state),
|
|
|
|
loading: selectFetchingClaimSearch(state),
|
|
|
|
showNsfw: makeSelectClientSetting(SETTINGS.SHOW_MATURE)(state),
|
2020-10-15 13:56:55 -04:00
|
|
|
searchInLanguage: makeSelectClientSetting(SETTINGS.SEARCH_IN_LANGUAGE)(state),
|
|
|
|
languageSetting: makeSelectClientSetting(SETTINGS.LANGUAGE)(state),
|
2020-08-21 11:49:13 -04:00
|
|
|
});
|
|
|
|
|
|
|
|
const perform = {
|
|
|
|
doToggleTagFollowDesktop,
|
|
|
|
doSetClientSetting,
|
|
|
|
};
|
|
|
|
|
2020-11-10 11:07:00 -05:00
|
|
|
export default connect(select, perform)(ClaimListHeader);
|