53079d92b6
* Move `PremiumPlusTile` into `Ads` This saves the need to repeat the logic everywhere. * Add option to disable fallback.
18 lines
651 B
JavaScript
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);
|