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

16 lines
571 B
JavaScript
Raw Normal View History

2021-01-27 00:45:34 +01:00
import { connect } from 'react-redux';
import { selectTheme } from 'redux/selectors/settings';
import { makeSelectClaimForUri, selectClaimIsNsfwForUri } from 'redux/selectors/claims';
import { selectUserVerifiedEmail } from 'redux/selectors/user';
2022-01-04 18:43:35 +01:00
import Ads, { injectAd } from './view';
2021-01-31 04:47:06 +01:00
const select = (state, props) => ({
2021-01-27 00:45:34 +01:00
theme: selectTheme(state),
2021-01-31 04:47:06 +01:00
claim: makeSelectClaimForUri(props.uri)(state),
isMature: selectClaimIsNsfwForUri(state, props.uri),
authenticated: selectUserVerifiedEmail(state),
2021-01-27 00:45:34 +01:00
});
export default connect(select)(Ads);
2022-01-04 18:43:35 +01:00
export { injectAd };