diff --git a/src/app/banners/BannerWrapper.tsx b/src/app/banners/BannerWrapper.tsx index ffd682ea8..eb8236755 100644 --- a/src/app/banners/BannerWrapper.tsx +++ b/src/app/banners/BannerWrapper.tsx @@ -5,11 +5,12 @@ import { PlanState } from '../store/slices/plan'; import { userSelectors } from '../store/slices/user'; import { useEffect, useState } from 'react'; import { useSelector } from 'react-redux'; -import FeaturesBanner from './FeaturesBanner'; + import { UserSettings } from '@internxt/sdk/dist/shared/types/userSettings'; +import Banner from './Banner'; -const SHOW_BANNER_COOKIE_NAME = 'show_valentines_banner_sale'; -const OFFER_OFF_DAY = new Date('2024-02-25'); +const SHOW_BANNER_COOKIE_NAME = 'show_lifetime_soft_banner'; +const OFFER_OFF_DAY = new Date('2024-02-29'); const BannerWrapper = (): JSX.Element => { const [showBanner, setShowBanner] = useState(false); @@ -17,11 +18,13 @@ const BannerWrapper = (): JSX.Element => { const plan = useSelector((state) => state.plan); const isTutorialCompleted = localStorageService.hasCompletedTutorial(user.userId); const userPlan = plan.subscription?.type; + + const isNewUser = userPlan === 'free'; const isNewAccount = useAppSelector(userSelectors.hasSignedToday); const isLocalStorage = localStorageService.get(SHOW_BANNER_COOKIE_NAME); const isOfferOffDay = new Date() > OFFER_OFF_DAY; - const shouldShowBanner = userPlan === 'free' && !isLocalStorage && !isOfferOffDay; + const shouldShowBanner = isNewUser && !isLocalStorage && !isOfferOffDay; useEffect(() => { handleBannerDisplay(); @@ -38,7 +41,7 @@ const BannerWrapper = (): JSX.Element => { } } - return ; + return ; }; export default BannerWrapper; diff --git a/src/app/banners/FeaturesBanner.tsx b/src/app/banners/FeaturesBanner.tsx index 929e098d4..782e64e40 100644 --- a/src/app/banners/FeaturesBanner.tsx +++ b/src/app/banners/FeaturesBanner.tsx @@ -1,8 +1,6 @@ -import { CheckCircle, Heart, X } from '@phosphor-icons/react'; +import { CheckCircle, CircleWavyCheck, X } from '@phosphor-icons/react'; import { useTranslationContext } from 'app/i18n/provider/TranslationProvider'; -const WEBSITE_URL = process.env.REACT_APP_WEBSITE_URL; - const FeaturesBanner = ({ showBanner, onClose }: { showBanner: boolean; onClose: () => void }): JSX.Element => { const { translate } = useTranslationContext(); @@ -27,68 +25,50 @@ const FeaturesBanner = ({ showBanner, onClose }: { showBanner: boolean; onClose: }, ]; - const handleOnClick = () => { - window.open(`${WEBSITE_URL}/pricing`, '_blank', 'noopener noreferrer'); - }; - return (
- {/* Banner */}
- -
-
-
-

{translate('featuresBanner.label')}

+
+
+
+

{translate('featuresBanner.header')}

+

{translate('featuresBanner.title')}

-

- {translate('featuresBanner.title')} -

- -
+
-
- -

{translate('featuresBanner.guarantee')}

+
+ +

{translate('lifetimeBanner.guarantee')}

- -

- {translate('featuresBanner.lastCta')} -

-
-
-
- {features.map((card) => ( -
- -

- {card.title} -

-
- ))} +
+ {features.map((item) => ( +
+ +

{item.title}

-
+ ))}
); }; - export default FeaturesBanner; diff --git a/src/app/i18n/locales/de.json b/src/app/i18n/locales/de.json index 8f91a5f40..020e2becb 100644 --- a/src/app/i18n/locales/de.json +++ b/src/app/i18n/locales/de.json @@ -4,18 +4,17 @@ "logOut": "Log-out" }, "featuresBanner": { - "label": "Spare 69%", - "title": "Süße Valentinstagsgeschenke!", - "cta": "Wähle einen Plan", - "guarantee": "30 Tage Geld-zurück-Garantie", - "lastCta": "*Angebot gilt für kostenlose Konten oder neue Kunden", + "header": "Spare 70%!", + "title": "Bereiten Sie sich auf die Datenschutzwoche vor", + "cta": "Plan auswählen", + "guarantee": "30-tägige Geld-zurück-Garantie", "features": { "discount": "Sparen Sie bei monatlichen und jährlichen Plänen", "safeCloud": "Sicherer und geschützter Cloud-Speicher", "openSource": "Open Source und transparent", "endToEnd": "Ende-zu-Ende-verschlüsselte Übertragungen", "unauthorized": "Kein unberechtigter Zugriff", - "offerEnds": "Angebot endet am 25. Februar" + "offerEnds": "Angebot endet am 29. Februar" } }, "valentinesBanner": { diff --git a/src/app/i18n/locales/en.json b/src/app/i18n/locales/en.json index 0d9e7b76d..ba13f28e5 100644 --- a/src/app/i18n/locales/en.json +++ b/src/app/i18n/locales/en.json @@ -4,8 +4,8 @@ "logOut": "Log Out" }, "featuresBanner": { - "label": "Save 69%", - "title": "Sweet Valentine's treats!", + "header": "Save 70%!", + "title": "Get ready for Data Privacy Week", "cta": "Choose plan", "guarantee": "30-day money-back guarantee", "lastCta": "*Offer is for free accounts or new customers", @@ -15,7 +15,7 @@ "openSource": "Open source and transparent", "endToEnd": "End-to-end encrypted transfers", "unauthorized": "No unauthorized access", - "offerEnds": "Offer ends February 25th" + "offerEnds": "Offer ends February 29th" } }, "valentinesBanner": { diff --git a/src/app/i18n/locales/es.json b/src/app/i18n/locales/es.json index 3e5bfe6a7..59c08767f 100644 --- a/src/app/i18n/locales/es.json +++ b/src/app/i18n/locales/es.json @@ -4,10 +4,10 @@ "logOut": "Cerrar sesión" }, "featuresBanner": { - "label": "Ahorra un 69%", - "title": "¡Dulces regalos de San Valentín!", + "header": "¡Ahorra un 70%!", + "title": "Prepárate para la Semana de la Privacidad de Datos", "cta": "Elige un plan", - "guarantee": "Garantía de devolución de dinero de 30 días", + "guarantee": "Garantía de devolución de 30 días", "lastCta": "*La oferta es para cuentas gratuitas o nuevos clientes", "features": { "discount": "Ahorra en suscripciones mensuales y anuales", @@ -15,7 +15,7 @@ "openSource": "Código abierto y transparente", "endToEnd": "Transferencias cifradas de extremo a extremo", "unauthorized": "Sin acceso no autorizado", - "offerEnds": "La oferta finaliza el 25 de febrero" + "offerEnds": "La oferta finaliza el 29 de febrero" } }, "valentinesBanner": { diff --git a/src/app/i18n/locales/fr.json b/src/app/i18n/locales/fr.json index 9622ad9ad..c4222b75a 100644 --- a/src/app/i18n/locales/fr.json +++ b/src/app/i18n/locales/fr.json @@ -4,8 +4,8 @@ "logOut": "Déconnexion" }, "featuresBanner": { - "label": "Économisez 69%", - "title": "Délices sucrés de la Saint-Valentin!", + "header": "Économisez 70% !", + "title": "Préparez-vous pour la Semaine de la Protection des Données", "cta": "Choisissez un plan", "guarantee": "Garantie de remboursement de 30 jours", "lastCta": "*L'offre est valable pour les comptes gratuits ou les nouveaux clients", @@ -15,7 +15,7 @@ "openSource": "Open source et transparent", "endToEnd": "Transferts chiffrés de bout en bout", "unauthorized": "Aucun accès non autorisé", - "offerEnds": "L'offre se termine le 25 février" + "offerEnds": "L'offre se termine le 29 février" } }, "valentinesBanner": { diff --git a/src/app/i18n/locales/it.json b/src/app/i18n/locales/it.json index 545fb419c..48399c42c 100644 --- a/src/app/i18n/locales/it.json +++ b/src/app/i18n/locales/it.json @@ -9,8 +9,8 @@ "cta": "Get the deal" }, "featuresBanner": { - "label": "Risparmia il 69%", - "title": "Dolci regali di San Valentino!", + "header": "Risparmia il 70%!", + "title": "Preparati per la Settimana della Privacy dei Dati", "cta": "Scegli un piano", "guarantee": "Garanzia di rimborso entro 30 giorni", "lastCta": "*L'offerta è valida solo per account gratuiti o nuovi clienti", @@ -20,7 +20,7 @@ "openSource": "Open source e trasparente", "endToEnd": "Trasferimenti crittografati end-to-end", "unauthorized": "Nessun accesso non autorizzato", - "offerEnds": "L'offerta termina il 25 febbraio" + "offerEnds": "L'offerta termina il 29 febbraio" } }, "lifetimeBanner": { diff --git a/src/app/i18n/locales/ru.json b/src/app/i18n/locales/ru.json index e4cfc8e06..a2bd553bc 100644 --- a/src/app/i18n/locales/ru.json +++ b/src/app/i18n/locales/ru.json @@ -9,8 +9,8 @@ "cta": "Получить скидку" }, "featuresBanner": { - "label": "Скидка 69%!", - "title": "Сладкие подарки к Дню св. Валентина!", + "label": "Сэкономьте 70%!", + "title": "Приготовьтесь к Неделе конфиденциальности данных", "cta": "Выбрать план", "guarantee": "30-дневная гарантия возврата денег", "lastCta": "*Предложение действует только для бесплатных аккаунтов или новых клиентов", @@ -20,7 +20,7 @@ "openSource": "Открытый исходный код и прозрачность", "endToEnd": "Передача данных в зашифрованном виде", "unauthorized": "Отсутствие несанкционированного доступа", - "offerEnds": "Предложение действует до 25 февраля" + "offerEnds": "Предложение действует до 29 февраля" } }, "lifetimeBanner": { diff --git a/src/app/i18n/locales/zh.json b/src/app/i18n/locales/zh.json index 2ebc7f2ba..b47561b86 100644 --- a/src/app/i18n/locales/zh.json +++ b/src/app/i18n/locales/zh.json @@ -4,8 +4,8 @@ "logOut": "登出" }, "featuresBanner": { - "label": "省69%", - "title": "甜蜜的情人节礼物!", + "header": "省 70%!", + "title": "为数据隐私周做好准备", "cta": "选择计划", "guarantee": "30 天内退款保证", "lastCta": "*此优惠仅适用于免费账户或新客户", @@ -15,7 +15,7 @@ "openSource": "开源和透明", "endToEnd": "端到端加密传输", "unauthorized": "无未经授权访问", - "offerEnds": "优惠截止日期为2月25日" + "offerEnds": "优惠截止日期为2月29日" } }, "valentinesBanner": {