Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-1969 Plus In App Promo & GH-1970 Telemetry #509

Merged
merged 18 commits into from Apr 20, 2020
Merged
Changes from 1 commit
Commits
File filter
Filter file types
Jump to
Jump to file
Failed to load files.

Always

Just for now

Fix handlePromoXClick, comment in PromoModal structure

  • Loading branch information
Eden12345 committed Apr 2, 2020
commit 31121c1665a8fae5305109364f6654bb8aa4c84a
@@ -58,7 +58,6 @@ class PromoModal extends React.Component {
* Handle clicks on sign in links in promo modals
*/
_handlePromoSignInClick = () => {
console.log('here');
this.props.actions.togglePromoModal();
history.push({
pathname: '/login',
@@ -70,11 +69,41 @@ class PromoModal extends React.Component {
_handleSubscribeClick = (type) => { this.props.handleSubscribeClick(type); }

_handlePromoXClick = (type) => {
console.log('test');
this.props.handleXClick(type);
this.props.actions.togglePromoModal();

if (type === 'insights') {
sendMessage('ping', 'promo_modals_decline_insights_upgrade');
}
}

renderModalContent() {
const { type } = this.props;
switch (type) {
case INSIGHTS:
return (
<InsightsPromoModal
handleSubscribeClick={() => this._handlePromoSubscribeClick(type)}
show
/>
);
case PLUS:
return <PlusPromoModal type={type} />;
case PREMIUM:
return <PremiumPromoModal {...this.props} />;
default:
return <InsightsPromoModal {...this.props} />;
}
}

render() {
// return (
// <Modal>
// <div className="CloseButton" handleClick={this._handlePromoXClick} />
// {this.renderModalContent()}
// <div className="SignInButton" handleClick={this._handlePromoSignInClick} />
// </Modal>
// );

const { type } = this.props;
switch (type) {
case INSIGHTS:
@@ -38,7 +38,9 @@ import { togglePromoModal } from '../../panel/actions/PanelActions'; // get shar
* @param {Object} ownProps Login view component own props
* @return {function} to be used as an argument in redux connect call
*/
const mapDispatchToProps = dispatch => ({ actions: bindActionCreators(Object.assign({ togglePromoModal }), dispatch) });
const mapDispatchToProps = dispatch => ({
actions: bindActionCreators(Object.assign({ togglePromoModal }), dispatch)
});
/**
* Connects PromoModal component to the Redux store.
* @param {function} mapStateToProps [description]
@@ -104,5 +104,6 @@
"cliqz/offers-cc/index.html",
"cliqz/offers-reminder/index.html",
"cliqz/popup-notification/images/*"
]
],
"debug": true
}
ProTip! Use n and p to navigate between commits in a pull request.