lbry-desktop/ui/component/fileViewCountInline/index.js
infinite-persistence 093c427b83
Show content view counts on channel pages
## 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.
2021-09-09 18:31:48 +08:00

13 lines
413 B
JavaScript

import { connect } from 'react-redux';
import { makeSelectClaimForUri } from 'lbry-redux';
import { makeSelectViewCountForUri } from 'lbryinc';
import FileViewCountInline from './view';
const select = (state, props) => {
return {
claim: makeSelectClaimForUri(props.uri)(state),
viewCount: makeSelectViewCountForUri(props.uri)(state),
};
};
export default connect(select, null)(FileViewCountInline);