2018-07-25 02:50:04 +02:00
|
|
|
import { connect } from 'react-redux';
|
2019-05-07 23:38:29 +02:00
|
|
|
import { makeSelectClaimForUri, doSearch, makeSelectRecommendedContentForUri, selectIsSearching } from 'lbry-redux';
|
2018-07-25 02:50:04 +02:00
|
|
|
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),
|
2018-08-27 05:18:57 +02:00
|
|
|
isSearching: selectIsSearching(state),
|
2018-07-25 02:50:04 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
const perform = dispatch => ({
|
2018-08-09 18:41:14 +02:00
|
|
|
search: query => dispatch(doSearch(query, 20, undefined, true)),
|
2018-07-25 02:50:04 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
export default connect(
|
|
|
|
select,
|
|
|
|
perform
|
|
|
|
)(RecommendedVideos);
|