2021-01-27 00:45:34 +01:00
|
|
|
import { connect } from 'react-redux';
|
2022-03-14 18:49:15 +01:00
|
|
|
import { doSetAdBlockerFound } from 'redux/actions/app';
|
2022-05-30 12:50:15 +02:00
|
|
|
import { selectAdBlockerFound } from 'redux/selectors/app';
|
2021-11-16 02:10:03 +01:00
|
|
|
import { makeSelectClaimForUri, selectClaimIsNsfwForUri } from 'redux/selectors/claims';
|
2022-05-18 19:52:46 +02:00
|
|
|
import { selectOdyseeMembershipIsPremiumPlus, selectUserCountry } from 'redux/selectors/user';
|
2022-03-07 13:11:28 +01:00
|
|
|
import Ads from './view';
|
2021-11-16 02:10:03 +01:00
|
|
|
|
2021-01-31 04:47:06 +01:00
|
|
|
const select = (state, props) => ({
|
|
|
|
claim: makeSelectClaimForUri(props.uri)(state),
|
2021-11-16 02:10:03 +01:00
|
|
|
isMature: selectClaimIsNsfwForUri(state, props.uri),
|
2022-05-30 12:50:15 +02:00
|
|
|
isAdBlockerFound: selectAdBlockerFound(state),
|
2022-03-09 19:05:37 +01:00
|
|
|
userHasPremiumPlus: selectOdyseeMembershipIsPremiumPlus(state),
|
2022-05-18 19:52:46 +02:00
|
|
|
userCountry: selectUserCountry(state),
|
2021-01-27 00:45:34 +01:00
|
|
|
});
|
|
|
|
|
2022-03-14 18:49:15 +01:00
|
|
|
const perform = {
|
|
|
|
doSetAdBlockerFound,
|
|
|
|
};
|
|
|
|
|
|
|
|
export default connect(select, perform)(Ads);
|