24 lines
767 B
JavaScript
24 lines
767 B
JavaScript
import { connect } from 'react-redux';
|
|
import {
|
|
makeSelectClaimForUri,
|
|
makeSelectClaimIsNsfw,
|
|
doSearch,
|
|
makeSelectRecommendedContentForUri,
|
|
selectIsSearching,
|
|
} from 'lbry-redux';
|
|
import { selectUserVerifiedEmail } from 'redux/selectors/user';
|
|
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),
|
|
isAuthenticated: selectUserVerifiedEmail(state),
|
|
});
|
|
|
|
const perform = dispatch => ({
|
|
search: (query, options) => dispatch(doSearch(query, options)),
|
|
});
|
|
|
|
export default connect(select, perform)(RecommendedVideos);
|