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.
32 lines
1.1 KiB
JavaScript
32 lines
1.1 KiB
JavaScript
import { connect } from 'react-redux';
|
|
import {
|
|
doClaimSearch,
|
|
selectClaimSearchByQuery,
|
|
selectFetchingClaimSearchByQuery,
|
|
SETTINGS,
|
|
selectClaimsByUri,
|
|
} from 'lbry-redux';
|
|
import { doFetchViewCount } from 'lbryinc';
|
|
import { doToggleTagFollowDesktop } from 'redux/actions/tags';
|
|
import { makeSelectClientSetting, selectShowMatureContent } from 'redux/selectors/settings';
|
|
import { selectModerationBlockList } from 'redux/selectors/comments';
|
|
import { selectMutedChannels } from 'redux/selectors/blocked';
|
|
import ClaimListDiscover from './view';
|
|
|
|
const select = (state) => ({
|
|
claimSearchByQuery: selectClaimSearchByQuery(state),
|
|
claimsByUri: selectClaimsByUri(state),
|
|
fetchingClaimSearchByQuery: selectFetchingClaimSearchByQuery(state),
|
|
showNsfw: selectShowMatureContent(state),
|
|
hideReposts: makeSelectClientSetting(SETTINGS.HIDE_REPOSTS)(state),
|
|
mutedUris: selectMutedChannels(state),
|
|
blockedUris: selectModerationBlockList(state),
|
|
});
|
|
|
|
const perform = {
|
|
doClaimSearch,
|
|
doToggleTagFollowDesktop,
|
|
doFetchViewCount,
|
|
};
|
|
|
|
export default connect(select, perform)(ClaimListDiscover);
|