lbry-desktop/ui/component/recommendedContent/index.js
2020-01-29 14:27:50 -05:00

26 lines
679 B
JavaScript

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