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

31 lines
1 KiB
JavaScript
Raw Normal View History

2019-06-11 14:10:58 -04:00
import { connect } from 'react-redux';
import {
doClaimSearch,
2019-08-22 21:04:48 -04:00
selectClaimSearchByQuery,
selectClaimSearchByQueryLastPageReached,
selectFetchingClaimSearch,
SETTINGS,
selectFollowedTags,
} from 'lbry-redux';
import { selectBlockedChannels } from 'redux/selectors/blocked';
import { doToggleTagFollowDesktop } from 'redux/actions/tags';
import { makeSelectClientSetting } from 'redux/selectors/settings';
2019-06-19 01:05:43 -04:00
import ClaimListDiscover from './view';
2019-06-11 14:10:58 -04:00
const select = state => ({
followedTags: selectFollowedTags(state),
2019-08-22 21:04:48 -04:00
claimSearchByQuery: selectClaimSearchByQuery(state),
claimSearchByQueryLastPageReached: selectClaimSearchByQueryLastPageReached(state),
2019-06-11 14:10:58 -04:00
loading: selectFetchingClaimSearch(state),
2019-09-17 14:49:03 -04:00
showNsfw: makeSelectClientSetting(SETTINGS.SHOW_MATURE)(state),
hideReposts: makeSelectClientSetting(SETTINGS.HIDE_REPOSTS)(state),
hiddenUris: selectBlockedChannels(state),
2019-06-11 14:10:58 -04:00
});
const perform = {
doClaimSearch,
doToggleTagFollowDesktop,
2019-06-11 14:10:58 -04:00
};
export default connect(select, perform)(ClaimListDiscover);