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

24 lines
583 B
JavaScript
Raw Normal View History

import { connect } from 'react-redux';
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 => ({
2018-08-09 18:41:14 +02:00
search: query => dispatch(doSearch(query, 20, undefined, true)),
});
export default connect(
select,
perform
)(RecommendedVideos);