2018-07-24 20:50:04 -04:00
|
|
|
import { connect } from 'react-redux';
|
2019-05-07 17:38:29 -04:00
|
|
|
import { makeSelectClaimForUri, doSearch, makeSelectRecommendedContentForUri, selectIsSearching } from 'lbry-redux';
|
2018-07-24 20:50:04 -04:00
|
|
|
import RecommendedVideos from './view';
|
|
|
|
|
|
|
|
const select = (state, props) => ({
|
2018-08-03 14:28:11 -04:00
|
|
|
claim: makeSelectClaimForUri(props.uri)(state),
|
|
|
|
recommendedContent: makeSelectRecommendedContentForUri(props.uri)(state),
|
2018-08-26 23:18:57 -04:00
|
|
|
isSearching: selectIsSearching(state),
|
2018-07-24 20:50:04 -04:00
|
|
|
});
|
|
|
|
|
2019-12-18 17:25:49 -05:00
|
|
|
const perform = (dispatch, ownProps) => ({
|
|
|
|
search: query => dispatch(doSearch(query, 20, undefined, true, { related_to: ownProps.claimId })),
|
2018-07-24 20:50:04 -04:00
|
|
|
});
|
|
|
|
|
|
|
|
export default connect(
|
|
|
|
select,
|
|
|
|
perform
|
|
|
|
)(RecommendedVideos);
|