From a234a72b07295a78b183b21f16a4d28e847028d2 Mon Sep 17 00:00:00 2001 From: Ben Date: Fri, 26 Jun 2020 11:30:09 -0400 Subject: [PATCH 1/2] Replace spring promo modal with premium promo modal --- src/classes/PromoModals.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/classes/PromoModals.js b/src/classes/PromoModals.js index 292ea0d9c..0c096ee27 100644 --- a/src/classes/PromoModals.js +++ b/src/classes/PromoModals.js @@ -42,9 +42,9 @@ class PromoModals { */ static whichPromoModalShouldWeDisplay() { // The order is important - // Insights takes priority over Plus + // Insights takes priority over Premium if (this._isTimeForAPromo(INSIGHTS)) return INSIGHTS; - if (this._isTimeForAPromo(PLUS)) return PLUS; + if (this._isTimeForAPromo(PREMIUM)) return PREMIUM; return null; } @@ -67,9 +67,9 @@ class PromoModals { static _isTimeForAPromo(type) { if (conf.notify_promotions === false) { return false; } - const lastSeenPlusPromo = conf[`${PLUS}_${PROMO_MODAL_LAST_SEEN}`]; + const lastSeenPremiumPromo = conf[`${PREMIUM}_${PROMO_MODAL_LAST_SEEN}`]; const lastSeenInsightsPromo = conf[`${INSIGHTS}_${PROMO_MODAL_LAST_SEEN}`]; - const lastSeenPromo = Math.max(lastSeenPlusPromo, lastSeenInsightsPromo); + const lastSeenPromo = Math.max(lastSeenPremiumPromo, lastSeenInsightsPromo); if (type === INSIGHTS && !this._hasEngagedFrequently()) { return false; From 913723688cf6d08a362225201645b36d5f272a9b Mon Sep 17 00:00:00 2001 From: Ben Date: Fri, 26 Jun 2020 12:37:10 -0400 Subject: [PATCH 2/2] Remove plus render --- app/panel/components/Panel.jsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/panel/components/Panel.jsx b/app/panel/components/Panel.jsx index 7fa4ca80f..7aae2e9fb 100644 --- a/app/panel/components/Panel.jsx +++ b/app/panel/components/Panel.jsx @@ -278,7 +278,7 @@ class Panel extends React.Component { /** * @returns {null|JSX} * @private - * Renders the Plus promo modal if the user is not already an subscriber + * Renders the Plus promo modal if the user is not already a Plus subscriber */ _renderPlusPromoModal = () => { if (this._hasPlusAccess() || this._hasPremiumAccess()) { return null; } @@ -312,10 +312,6 @@ class Panel extends React.Component { return this._renderInsightsPromoModal(); } - if (promoModal === 'plus') { - return this._renderPlusPromoModal(); - } - if (promoModal === 'premium') { return this._renderPremiumPromoModal(); }