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

19 lines
620 B
JavaScript
Raw Normal View History

import { connect } from 'react-redux';
2019-05-07 23:38:29 +02:00
import { makeSelectClaimForUri, doSearch, makeSelectRecommendedContentForUri, selectIsSearching } from 'lbry-redux';
import RecommendedVideos from './view';
const select = (state, props) => ({
2018-08-03 20:28:11 +02:00
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);