lbry-desktop/ui/component/recommendedContent/index.js
jessop c7351551da blocks mature content from search when appropriate
wip bump lbry-redux

refactor search selector

bump redux
2020-01-31 15:10:35 -05:00

25 lines
658 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, options)),
});
export default connect(
select,
perform
)(RecommendedVideos);