lbry-desktop/ui/component/recommendedContent/index.js
2019-12-18 17:30:33 -05:00

18 lines
620 B
JavaScript

import { connect } from 'react-redux';
import { makeSelectClaimForUri, doSearch, makeSelectRecommendedContentForUri, selectIsSearching } from 'lbry-redux';
import RecommendedVideos from './view';
const select = (state, props) => ({
claim: makeSelectClaimForUri(props.uri)(state),
recommendedContent: makeSelectRecommendedContentForUri(props.uri)(state),
isSearching: selectIsSearching(state),
});
const perform = (dispatch, ownProps) => ({
search: query => dispatch(doSearch(query, 20, undefined, true, { related_to: ownProps.claimId })),
});
export default connect(
select,
perform
)(RecommendedVideos);