2018-07-24 20:50:04 -04:00
|
|
|
import { connect } from 'react-redux';
|
2020-01-28 17:05:44 -05:00
|
|
|
import {
|
|
|
|
makeSelectClaimForUri,
|
|
|
|
makeSelectClaimIsNsfw,
|
|
|
|
doSearch,
|
|
|
|
makeSelectRecommendedContentForUri,
|
|
|
|
selectIsSearching,
|
|
|
|
} from 'lbry-redux';
|
2020-03-26 17:47:07 -04:00
|
|
|
import { selectUserVerifiedEmail } from 'lbryinc';
|
2018-07-24 20:50:04 -04:00
|
|
|
import RecommendedVideos from './view';
|
|
|
|
|
|
|
|
const select = (state, props) => ({
|
2018-08-03 14:28:11 -04:00
|
|
|
claim: makeSelectClaimForUri(props.uri)(state),
|
2020-01-28 17:05:44 -05:00
|
|
|
mature: makeSelectClaimIsNsfw(props.uri)(state),
|
2018-08-03 14:28:11 -04:00
|
|
|
recommendedContent: makeSelectRecommendedContentForUri(props.uri)(state),
|
2018-08-26 23:18:57 -04:00
|
|
|
isSearching: selectIsSearching(state),
|
2020-03-26 17:47:07 -04:00
|
|
|
isAuthenticated: selectUserVerifiedEmail(state),
|
2018-07-24 20:50:04 -04:00
|
|
|
});
|
|
|
|
|
2020-01-28 17:05:44 -05:00
|
|
|
const perform = dispatch => ({
|
2020-01-30 02:09:12 -05:00
|
|
|
search: (query, options) => dispatch(doSearch(query, options)),
|
2018-07-24 20:50:04 -04:00
|
|
|
});
|
|
|
|
|
2020-03-26 17:47:07 -04:00
|
|
|
export default connect(select, perform)(RecommendedVideos);
|