lbry-desktop/web/component/ads/index.js
infinite-persistence 53079d92b6
Move PremiumPlusTile into Ads (#1522)
* Move `PremiumPlusTile` into `Ads`

This saves the need to repeat the logic everywhere.

* Add option to disable fallback.
2022-05-18 19:52:46 +02:00

18 lines
651 B
JavaScript

import { connect } from 'react-redux';
import { doSetAdBlockerFound } from 'redux/actions/app';
import { makeSelectClaimForUri, selectClaimIsNsfwForUri } from 'redux/selectors/claims';
import { selectOdyseeMembershipIsPremiumPlus, selectUserCountry } from 'redux/selectors/user';
import Ads from './view';
const select = (state, props) => ({
claim: makeSelectClaimForUri(props.uri)(state),
isMature: selectClaimIsNsfwForUri(state, props.uri),
userHasPremiumPlus: selectOdyseeMembershipIsPremiumPlus(state),
userCountry: selectUserCountry(state),
});
const perform = {
doSetAdBlockerFound,
};
export default connect(select, perform)(Ads);