2021-01-26 18:45:34 -05:00
|
|
|
import { connect } from 'react-redux';
|
2022-03-15 01:49:15 +08:00
|
|
|
import { doSetAdBlockerFound } from 'redux/actions/app';
|
2021-01-26 18:45:34 -05:00
|
|
|
import { selectTheme } from 'redux/selectors/settings';
|
2021-11-16 09:10:03 +08:00
|
|
|
import { makeSelectClaimForUri, selectClaimIsNsfwForUri } from 'redux/selectors/claims';
|
2022-03-09 19:05:37 +01:00
|
|
|
import { selectOdyseeMembershipIsPremiumPlus } from 'redux/selectors/user';
|
2022-03-07 20:11:28 +08:00
|
|
|
import Ads from './view';
|
2021-11-16 09:10:03 +08:00
|
|
|
|
2021-01-30 22:47:06 -05:00
|
|
|
const select = (state, props) => ({
|
2021-01-26 18:45:34 -05:00
|
|
|
theme: selectTheme(state),
|
2021-01-30 22:47:06 -05:00
|
|
|
claim: makeSelectClaimForUri(props.uri)(state),
|
2021-11-16 09:10:03 +08:00
|
|
|
isMature: selectClaimIsNsfwForUri(state, props.uri),
|
2022-03-09 19:05:37 +01:00
|
|
|
userHasPremiumPlus: selectOdyseeMembershipIsPremiumPlus(state),
|
2021-01-26 18:45:34 -05:00
|
|
|
});
|
|
|
|
|
2022-03-15 01:49:15 +08:00
|
|
|
const perform = {
|
|
|
|
doSetAdBlockerFound,
|
|
|
|
};
|
|
|
|
|
|
|
|
export default connect(select, perform)(Ads);
|