-
[Upgrade version of the Plus Promo modal]
-
-
Dismiss
+
+

+
+ {t('upgrade_your_ghostery_experience')}
+
+
+ {t('upgrade_cta_TEXT')}
+
+
+
+ {t('upgrade_to_plus')}
+
+
+
+ {
+ !signedIn &&
+ (
+
+ {t('already_subscribed_sign_in')}
+
+ )
+ }
+
+ {t('no_thanks_turn_promos_off')}
+
@@ -233,12 +273,17 @@ class Panel extends React.Component {
const { plusPromoModalShown } = this.state;
const { account, haveSeenInitialPlusPromo, isTimeForAPlusPromo } = this.props;
- if (account && account.user && account.user.subscriptionsPlus) return null; // don't show the promo to Plus subscribers!
- if (account && account.user && account.user.scopes && account.user.scopes.includes('subscriptions:insights')) return null; // don't show the promo to Insights subscribers, either
-
+ // The business logic that controls how often promo modals should be shown lives in src/classes/PromoModals
if (plusPromoModalShown || !isTimeForAPlusPromo) return null;
- if (haveSeenInitialPlusPromo) { return this._renderPlusPromoUpgradeModal(); }
+ // Check account status
+ const signedIn = account && account.user;
+ const plusSubscriber = signedIn && account.user.subscriptionsPlus;
+ const insightsSubscriber = signedIn && account.user.scopes && account.user.scopes.includes('subscriptions:insights');
+
+ if (plusSubscriber || insightsSubscriber) return null;
+
+ if (haveSeenInitialPlusPromo) { return this._renderPlusPromoUpgradeModal(signedIn); }
return (
{
{(loggedIn === 'false') && (