lbry-desktop/web/component/ads/index.js

21 lines
760 B
JavaScript
Raw Normal View History

2021-01-27 00:45:34 +01:00
import { connect } from 'react-redux';
import { doSetAdBlockerFound } from 'redux/actions/app';
import { selectAdBlockerFound } from 'redux/selectors/app';
import { makeSelectClaimForUri, selectClaimIsNsfwForUri } from 'redux/selectors/claims';
import { selectOdyseeMembershipIsPremiumPlus, selectUserCountry } from 'redux/selectors/user';
import Ads from './view';
2021-01-31 04:47:06 +01:00
const select = (state, props) => ({
claim: makeSelectClaimForUri(props.uri)(state),
isMature: selectClaimIsNsfwForUri(state, props.uri),
isAdBlockerFound: selectAdBlockerFound(state),
userHasPremiumPlus: selectOdyseeMembershipIsPremiumPlus(state),
userCountry: selectUserCountry(state),
2021-01-27 00:45:34 +01:00
});
const perform = {
doSetAdBlockerFound,
};
export default connect(select, perform)(Ads);