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

23 lines
921 B
JavaScript
Raw Normal View History

import { connect } from 'react-redux';
2020-07-27 22:04:12 +02:00
import { makeSelectClaimForUri, makeSelectClaimIsNsfw } from 'lbry-redux';
import { doSearch } from 'redux/actions/search';
import { makeSelectRecommendedContentForUri, selectIsSearching } from 'redux/selectors/search';
import { selectUserVerifiedEmail } from 'redux/selectors/user';
import RecommendedVideos from './view';
import { selectTheme } from 'redux/selectors/settings';
const select = (state, props) => ({
2018-08-03 20:28:11 +02:00
claim: makeSelectClaimForUri(props.uri)(state),
2020-01-28 23:05:44 +01:00
mature: makeSelectClaimIsNsfw(props.uri)(state),
2018-08-03 20:28:11 +02:00
recommendedContent: makeSelectRecommendedContentForUri(props.uri)(state),
isSearching: selectIsSearching(state),
theme: selectTheme(state),
2020-03-26 22:47:07 +01:00
isAuthenticated: selectUserVerifiedEmail(state),
});
2020-01-28 23:05:44 +01:00
const perform = dispatch => ({
search: (query, options) => dispatch(doSearch(query, options)),
});
2020-03-26 22:47:07 +01:00
export default connect(select, perform)(RecommendedVideos);