093c427b83
## Issue 3587 Show content view counts on channel pages ## Notes Limited to just "channel pages" for now as specified in the ticket. Can be enabled for all claim previews, as long as there's an efficient spot to run the batch fetching. Either make `fetchViewCount` prop default to true, or add the parameter in places that need it.
38 lines
1.4 KiB
JavaScript
38 lines
1.4 KiB
JavaScript
import { connect } from 'react-redux';
|
|
import {
|
|
doClaimSearch,
|
|
selectClaimsByUri,
|
|
selectClaimSearchByQuery,
|
|
selectClaimSearchByQueryLastPageReached,
|
|
selectFetchingClaimSearch,
|
|
SETTINGS,
|
|
} from 'lbry-redux';
|
|
import { selectFollowedTags } from 'redux/selectors/tags';
|
|
import { selectMutedChannels } from 'redux/selectors/blocked';
|
|
import { doToggleTagFollowDesktop } from 'redux/actions/tags';
|
|
import { makeSelectClientSetting, selectShowMatureContent, selectLanguage } from 'redux/selectors/settings';
|
|
import { selectModerationBlockList } from 'redux/selectors/comments';
|
|
import ClaimListDiscover from './view';
|
|
import { doFetchViewCount } from 'lbryinc';
|
|
|
|
const select = (state) => ({
|
|
followedTags: selectFollowedTags(state),
|
|
claimSearchByQuery: selectClaimSearchByQuery(state),
|
|
claimSearchByQueryLastPageReached: selectClaimSearchByQueryLastPageReached(state),
|
|
claimsByUri: selectClaimsByUri(state),
|
|
loading: selectFetchingClaimSearch(state),
|
|
showNsfw: selectShowMatureContent(state),
|
|
hideReposts: makeSelectClientSetting(SETTINGS.HIDE_REPOSTS)(state),
|
|
languageSetting: selectLanguage(state),
|
|
mutedUris: selectMutedChannels(state),
|
|
blockedUris: selectModerationBlockList(state),
|
|
searchInLanguage: makeSelectClientSetting(SETTINGS.SEARCH_IN_LANGUAGE)(state),
|
|
});
|
|
|
|
const perform = {
|
|
doClaimSearch,
|
|
doToggleTagFollowDesktop,
|
|
doFetchViewCount,
|
|
};
|
|
|
|
export default connect(select, perform)(ClaimListDiscover);
|