From 29db15c115e9095ec41f3a55a5d41c3aafa08402 Mon Sep 17 00:00:00 2001 From: internxt-yu Date: Tue, 18 Aug 2026 14:41:58 +0200 Subject: [PATCH 01/10] adjust spacing and size of images --- .../home-assistant/ConfigurationSection.tsx | 66 ++++++++++++++----- src/components/home-assistant/HeroSection.tsx | 15 +++-- 2 files changed, 57 insertions(+), 24 deletions(-) diff --git a/src/components/home-assistant/ConfigurationSection.tsx b/src/components/home-assistant/ConfigurationSection.tsx index 7a39a53f7..ae5c71fad 100644 --- a/src/components/home-assistant/ConfigurationSection.tsx +++ b/src/components/home-assistant/ConfigurationSection.tsx @@ -10,38 +10,41 @@ const ConfigurationSection = ({ textContent }: ConfigurationSectionProps): JSX.E return (
-

+

{textContent.title}

-

+

+ {textContent.description}

-
- configuration-image -
+
+
+ configuration-image +
+
{textContent.accordionCard.titles.map((title: string, index: number) => ( -
- +
+ {index + 1} -

{title}

+

{title}

-
+
{textContent.accordionCard.descriptions[index]}
))} -
+
{textContent.features.map((title: string) => (
{title}
@@ -51,6 +54,35 @@ const ConfigurationSection = ({ textContent }: ConfigurationSectionProps): JSX.E
+
); }; diff --git a/src/components/home-assistant/HeroSection.tsx b/src/components/home-assistant/HeroSection.tsx index be51c5437..8dc07c0fb 100644 --- a/src/components/home-assistant/HeroSection.tsx +++ b/src/components/home-assistant/HeroSection.tsx @@ -53,14 +53,14 @@ export default function HeroSection({ return (
-
+
{products.map((feature, index) => (

@@ -117,12 +117,13 @@ export default function HeroSection({
Internxt Partners HeroSection Image

From f5cb326f1a89a54104ebe0b9020c4c680477d501 Mon Sep 17 00:00:00 2001 From: internxt-yu Date: Tue, 18 Aug 2026 15:54:28 +0200 Subject: [PATCH 02/10] changed the price to obtain dinamically and adjust spacing --- src/assets/lang/de/home-assistant.json | 2 +- src/assets/lang/en/home-assistant.json | 2 +- src/assets/lang/es/home-assistant.json | 2 +- src/assets/lang/fr/home-assistant.json | 2 +- src/assets/lang/it/home-assistant.json | 2 +- src/assets/lang/ru/home-assistant.json | 2 +- src/assets/lang/zh-tw/home-assistant.json | 2 +- src/assets/lang/zh/home-assistant.json | 2 +- .../home-assistant/ConfigurationSection.tsx | 33 ++----------------- src/components/home-assistant/HeroSection.tsx | 23 +++++-------- src/pages/ga/home-assistant.tsx | 11 +++++-- src/utils/priceHelper.ts | 13 ++++++++ 12 files changed, 40 insertions(+), 56 deletions(-) diff --git a/src/assets/lang/de/home-assistant.json b/src/assets/lang/de/home-assistant.json index 82d189b30..63f14827b 100644 --- a/src/assets/lang/de/home-assistant.json +++ b/src/assets/lang/de/home-assistant.json @@ -12,7 +12,7 @@ "title": "Sicherer Cloud-Speicher für Ihre **Home Assistant-Backups**", "description": "Automatisierte Offsite-Backups nach dem Zero-Knowledge-Prinzip. Entwickelt in Europa für maximale Privatsphäre und Datenkontrolle.", "subtitle": "Holen Sie sich {{discount}}% Rabatt", - "claimDeal": "Holen Sie sich 3 TB für 2,99 €/Monat" + "claimDeal": "Holen Sie sich 3 TB für {{price}} {{currency}}/Monat" }, "TableSection": { "title": "Internxt-Tarife", diff --git a/src/assets/lang/en/home-assistant.json b/src/assets/lang/en/home-assistant.json index 489ab5158..bc1df1d99 100644 --- a/src/assets/lang/en/home-assistant.json +++ b/src/assets/lang/en/home-assistant.json @@ -12,7 +12,7 @@ "title": "Secure cloud storage for your **Home Assistant Backups**", "description": "Automated, zero-knowledge offsite backups. Built in Europe for maximum privacy and data control.", "subtitle": "Get {{discount}}% of discount ", - "claimDeal": "Get 3 TB for €2.99/mo" + "claimDeal": "Get 3 TB for {{price}} {{currency}}/month" }, "TableSection": { "title": "Internxt Plans", diff --git a/src/assets/lang/es/home-assistant.json b/src/assets/lang/es/home-assistant.json index a4e678e8e..4ccf65dbc 100644 --- a/src/assets/lang/es/home-assistant.json +++ b/src/assets/lang/es/home-assistant.json @@ -12,7 +12,7 @@ "title": "Almacenamiento en la nube seguro para tus **copias de seguridad de Home Assistant**", "description": "Copias de seguridad externas automatizadas con conocimiento cero (zero-knowledge). Creado en Europa para el máximo control de datos y privacidad.", "subtitle": "Consigue un {{discount}}% de descuento", - "claimDeal": "Consigue 3 TB por 2,99 €/mes" + "claimDeal": "Consigue 3 TB por {{price}} {{currency}}/mes" }, "TableSection": { "title": "Planes de Internxt", diff --git a/src/assets/lang/fr/home-assistant.json b/src/assets/lang/fr/home-assistant.json index 5b6ee95eb..c6f9e468c 100644 --- a/src/assets/lang/fr/home-assistant.json +++ b/src/assets/lang/fr/home-assistant.json @@ -12,7 +12,7 @@ "title": "Stockage cloud sécurisé para vos **sauvegardes Home Assistant**", "description": "Sauvegardes distantes automatisées à connaissance nulle (zero-knowledge). Conçu en Europe pour une confidentialité et un contrôle des données maximaux.", "subtitle": "Obtenez {{discount}}% de réduction", - "claimDeal": "Obtenez 3 To pour 2,99 €/mois" + "claimDeal": "Obtenez 3 To pour {{price}} {{currency}}/mois" }, "TableSection": { "title": "Offres Internxt", diff --git a/src/assets/lang/it/home-assistant.json b/src/assets/lang/it/home-assistant.json index d2dcc3ad4..b2d105a5d 100644 --- a/src/assets/lang/it/home-assistant.json +++ b/src/assets/lang/it/home-assistant.json @@ -12,7 +12,7 @@ "title": "Spazio cloud sicuro per i tuoi **backup di Home Assistant**", "description": "Backup esterni automatizzati a conoscenza zero (zero-knowledge). Creato in Europa per il massimo controllo dei dati e della privacy.", "subtitle": "Ottieni il {{discount}}% di sconto", - "claimDeal": "Ottieni 3 TB a 2,99 €/mese" + "claimDeal": "Ottieni 3 TB a {{price}} {{currency}}/mese" }, "TableSection": { "title": "Piani Internxt", diff --git a/src/assets/lang/ru/home-assistant.json b/src/assets/lang/ru/home-assistant.json index 36776e770..43833cac7 100644 --- a/src/assets/lang/ru/home-assistant.json +++ b/src/assets/lang/ru/home-assistant.json @@ -12,7 +12,7 @@ "title": "Защищенное облачное хранилище для ваших **резервных копий Home Assistant**", "description": "Автоматизированное удаленное резервное копирование с нулевым разглашением (zero-knowledge). Создано в Европе для максимальной приватности и контроля над данными.", "subtitle": "Получите скидку {{discount}}%", - "claimDeal": "Получите 3 ТБ за €2.99/мес" + "claimDeal": "Получите 3 ТБ за {{price}} {{currency}}/мес" }, "TableSection": { "title": "Тарифы Internxt", diff --git a/src/assets/lang/zh-tw/home-assistant.json b/src/assets/lang/zh-tw/home-assistant.json index b812fb21f..346c41560 100644 --- a/src/assets/lang/zh-tw/home-assistant.json +++ b/src/assets/lang/zh-tw/home-assistant.json @@ -12,7 +12,7 @@ "title": "為您的 **Home Assistant 備份** 提供安全的雲端儲存空間", "description": "自動化的零知識 (Zero-Knowledge) 異地備份。源自歐洲,專為最大化隱私與數據控制而打造。", "subtitle": "獲取 {{discount}}% 折扣", - "claimDeal": "只需 €2.99/月 即可獲得 3 TB" + "claimDeal": "只需 {{price}} {{currency}}/月 即可獲得 3 TB" }, "TableSection": { "title": "Internxt 方案", diff --git a/src/assets/lang/zh/home-assistant.json b/src/assets/lang/zh/home-assistant.json index 48c83f8d5..3f22dab9c 100644 --- a/src/assets/lang/zh/home-assistant.json +++ b/src/assets/lang/zh/home-assistant.json @@ -12,7 +12,7 @@ "title": "为您的 **Home Assistant 备份** 提供安全的云存储", "description": "自动化的零知识 (Zero-Knowledge) 异地备份。源自欧洲,专为最大化隐私与数据控制而打造。", "subtitle": "获取 {{discount}}% 折扣", - "claimDeal": "仅需 €2.99/月 即可获得 3 TB" + "claimDeal": "仅需 {{price}} {{currency}}/月 即可获得 3 TB" }, "TableSection": { "title": "Internxt 套餐计划", diff --git a/src/components/home-assistant/ConfigurationSection.tsx b/src/components/home-assistant/ConfigurationSection.tsx index ae5c71fad..b05c8afe5 100644 --- a/src/components/home-assistant/ConfigurationSection.tsx +++ b/src/components/home-assistant/ConfigurationSection.tsx @@ -18,7 +18,7 @@ const ConfigurationSection = ({ textContent }: ConfigurationSectionProps): JSX.E {textContent.description}

-
+
configuration-image
-
+
{textContent.accordionCard.titles.map((title: string, index: number) => (
@@ -54,35 +54,6 @@ const ConfigurationSection = ({ textContent }: ConfigurationSectionProps): JSX.E
- ); }; diff --git a/src/components/home-assistant/HeroSection.tsx b/src/components/home-assistant/HeroSection.tsx index 8dc07c0fb..06d2c4408 100644 --- a/src/components/home-assistant/HeroSection.tsx +++ b/src/components/home-assistant/HeroSection.tsx @@ -11,31 +11,23 @@ import { VideoConference, } from '@phosphor-icons/react'; import Link from 'next/link'; -import { currencyService } from '@/services/currency.service'; -import { useEffect, useState } from 'react'; import { HighlightText } from '../components/HighlightText'; interface HeroSectionForPartnerProps { textContent: any; percentOff: string; + price: string; + currency: string; darkMode?: boolean; } export default function HeroSection({ textContent, percentOff, + price, + currency, darkMode = false, }: Readonly): JSX.Element { - const [currency, setCurrency] = useState('€'); - - useEffect(() => { - currencyService - .filterCurrencyByCountry() - .then((currency) => { - setCurrency(currency.currency); - }) - .catch(() => { }); - }, []); const products = [ { icon: CloudArrowUp, text: textContent.products.drive }, @@ -53,7 +45,7 @@ export default function HeroSection({ return (
- {textContent.claimDeal} + {textContent.claimDeal + .replace('{{price}}', price) + .replace('{{currency}}', currency) + }
diff --git a/src/pages/ga/home-assistant.tsx b/src/pages/ga/home-assistant.tsx index 50375d29f..ad0b03c97 100644 --- a/src/pages/ga/home-assistant.tsx +++ b/src/pages/ga/home-assistant.tsx @@ -8,11 +8,12 @@ import usePricing from '@/hooks/usePricing'; import Navbar from '@/components/layout/navbars/Navbar'; import HeroSection from '@/components/home-assistant/HeroSection'; import { PricingSectionWrapper } from '@/components/shared/pricing/PricingSectionWrapper'; -import { stripeService } from '@/services/stripe.service'; +import { Interval, stripeService } from '@/services/stripe.service'; import { HomeAssistantText } from '@/assets/types/home-assistant'; import ThreeCardsIconsSection from '@/components/shared/sections/ThreeCardsIconsSection'; import ConfigurationSection from '@/components/home-assistant/ConfigurationSection'; import HorizontalScrollableSection from '@/components/shared/HorizontalScrollableSection'; +import { get3TBPrice } from '@/utils/priceHelper'; interface HomeAssistantProps { lang: GetServerSidePropsContext['locale']; @@ -30,6 +31,7 @@ const HomeAssistantPage = ({ metatagsDescriptions, langJson, lang, footerLang, n const { products, loadingCards, + currency, currencyValue, coupon: individualCoupon, lifetimeCoupon, @@ -39,6 +41,7 @@ const HomeAssistantPage = ({ metatagsDescriptions, langJson, lang, footerLang, n const percentOff = lifetimeCoupon?.percentOff === undefined ? '0' : String(lifetimeCoupon.percentOff); const decimalDiscountForLifetime = lifetimeCoupon?.percentOff && 100 - lifetimeCoupon.percentOff; const decimalDiscount = individualCoupon?.percentOff && 100 - individualCoupon.percentOff; + const price = get3TBPrice(products, decimalDiscount); const onCheckoutButtonClicked = async ( priceId: string, @@ -72,7 +75,7 @@ const HomeAssistantPage = ({ metatagsDescriptions, langJson, lang, footerLang, n - + diff --git a/src/utils/priceHelper.ts b/src/utils/priceHelper.ts index ced4577f1..ab12a2349 100644 --- a/src/utils/priceHelper.ts +++ b/src/utils/priceHelper.ts @@ -8,6 +8,19 @@ export const getMinimumPrice = ( if (!price) return '9.99'; + return decimalDiscount + ?(Math.floor(price * (decimalDiscount / 100) * 100) / 100).toFixed(2) + : price.toFixed(2); +} + +export const get3TBPrice = ( + products: any, + decimalDiscount?: number +): string => { + const price = Number(products?.individuals?.[Interval.Year]?.[1]?.price); + + if (!price) return '2.99'; + return decimalDiscount ?(Math.floor(price * (decimalDiscount / 100) * 100) / 100).toFixed(2) : price.toFixed(2); From e655d141ee5fc472b400b005a1d5bf77d8888764 Mon Sep 17 00:00:00 2001 From: internxt-yu Date: Tue, 18 Aug 2026 16:10:47 +0200 Subject: [PATCH 03/10] adjust spacing --- src/components/home-assistant/HeroSection.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/home-assistant/HeroSection.tsx b/src/components/home-assistant/HeroSection.tsx index 06d2c4408..f697743a5 100644 --- a/src/components/home-assistant/HeroSection.tsx +++ b/src/components/home-assistant/HeroSection.tsx @@ -71,8 +71,8 @@ export default function HeroSection({ ))}

From d4009ed48f41261bcc3afd721a4d90eb0a77adce Mon Sep 17 00:00:00 2001 From: internxt-yu Date: Wed, 19 Aug 2026 09:05:35 +0200 Subject: [PATCH 04/10] change CTA text to Claim deal and change pricing table to show only ultimate plan --- src/assets/lang/de/home-assistant.json | 2 +- src/assets/lang/en/home-assistant.json | 2 +- src/assets/lang/es/home-assistant.json | 2 +- src/assets/lang/fr/home-assistant.json | 2 +- src/assets/lang/it/home-assistant.json | 2 +- src/assets/lang/ru/home-assistant.json | 2 +- src/assets/lang/zh-tw/home-assistant.json | 2 +- src/assets/lang/zh/home-assistant.json | 2 +- src/components/home-assistant/HeroSection.tsx | 9 +-------- src/pages/ga/home-assistant.tsx | 12 ++++-------- src/utils/priceHelper.ts | 13 ------------- 11 files changed, 13 insertions(+), 37 deletions(-) diff --git a/src/assets/lang/de/home-assistant.json b/src/assets/lang/de/home-assistant.json index 63f14827b..8211f646f 100644 --- a/src/assets/lang/de/home-assistant.json +++ b/src/assets/lang/de/home-assistant.json @@ -12,7 +12,7 @@ "title": "Sicherer Cloud-Speicher für Ihre **Home Assistant-Backups**", "description": "Automatisierte Offsite-Backups nach dem Zero-Knowledge-Prinzip. Entwickelt in Europa für maximale Privatsphäre und Datenkontrolle.", "subtitle": "Holen Sie sich {{discount}}% Rabatt", - "claimDeal": "Holen Sie sich 3 TB für {{price}} {{currency}}/Monat" + "claimDeal": "Angebot sichern" }, "TableSection": { "title": "Internxt-Tarife", diff --git a/src/assets/lang/en/home-assistant.json b/src/assets/lang/en/home-assistant.json index bc1df1d99..22b259845 100644 --- a/src/assets/lang/en/home-assistant.json +++ b/src/assets/lang/en/home-assistant.json @@ -12,7 +12,7 @@ "title": "Secure cloud storage for your **Home Assistant Backups**", "description": "Automated, zero-knowledge offsite backups. Built in Europe for maximum privacy and data control.", "subtitle": "Get {{discount}}% of discount ", - "claimDeal": "Get 3 TB for {{price}} {{currency}}/month" + "claimDeal": "Claim deal" }, "TableSection": { "title": "Internxt Plans", diff --git a/src/assets/lang/es/home-assistant.json b/src/assets/lang/es/home-assistant.json index 4ccf65dbc..cedf512a1 100644 --- a/src/assets/lang/es/home-assistant.json +++ b/src/assets/lang/es/home-assistant.json @@ -12,7 +12,7 @@ "title": "Almacenamiento en la nube seguro para tus **copias de seguridad de Home Assistant**", "description": "Copias de seguridad externas automatizadas con conocimiento cero (zero-knowledge). Creado en Europa para el máximo control de datos y privacidad.", "subtitle": "Consigue un {{discount}}% de descuento", - "claimDeal": "Consigue 3 TB por {{price}} {{currency}}/mes" + "claimDeal": "Reclamar oferta" }, "TableSection": { "title": "Planes de Internxt", diff --git a/src/assets/lang/fr/home-assistant.json b/src/assets/lang/fr/home-assistant.json index c6f9e468c..bceb099bf 100644 --- a/src/assets/lang/fr/home-assistant.json +++ b/src/assets/lang/fr/home-assistant.json @@ -12,7 +12,7 @@ "title": "Stockage cloud sécurisé para vos **sauvegardes Home Assistant**", "description": "Sauvegardes distantes automatisées à connaissance nulle (zero-knowledge). Conçu en Europe pour une confidentialité et un contrôle des données maximaux.", "subtitle": "Obtenez {{discount}}% de réduction", - "claimDeal": "Obtenez 3 To pour {{price}} {{currency}}/mois" + "claimDeal": "Profiter de l'offre" }, "TableSection": { "title": "Offres Internxt", diff --git a/src/assets/lang/it/home-assistant.json b/src/assets/lang/it/home-assistant.json index b2d105a5d..1ace7abb7 100644 --- a/src/assets/lang/it/home-assistant.json +++ b/src/assets/lang/it/home-assistant.json @@ -12,7 +12,7 @@ "title": "Spazio cloud sicuro per i tuoi **backup di Home Assistant**", "description": "Backup esterni automatizzati a conoscenza zero (zero-knowledge). Creato in Europa per il massimo controllo dei dati e della privacy.", "subtitle": "Ottieni il {{discount}}% di sconto", - "claimDeal": "Ottieni 3 TB a {{price}} {{currency}}/mese" + "claimDeal": "Riscatta l'offerta" }, "TableSection": { "title": "Piani Internxt", diff --git a/src/assets/lang/ru/home-assistant.json b/src/assets/lang/ru/home-assistant.json index 43833cac7..685ef169f 100644 --- a/src/assets/lang/ru/home-assistant.json +++ b/src/assets/lang/ru/home-assistant.json @@ -12,7 +12,7 @@ "title": "Защищенное облачное хранилище для ваших **резервных копий Home Assistant**", "description": "Автоматизированное удаленное резервное копирование с нулевым разглашением (zero-knowledge). Создано в Европе для максимальной приватности и контроля над данными.", "subtitle": "Получите скидку {{discount}}%", - "claimDeal": "Получите 3 ТБ за {{price}} {{currency}}/мес" + "claimDeal": "Забрать скидку" }, "TableSection": { "title": "Тарифы Internxt", diff --git a/src/assets/lang/zh-tw/home-assistant.json b/src/assets/lang/zh-tw/home-assistant.json index 346c41560..4d370f40c 100644 --- a/src/assets/lang/zh-tw/home-assistant.json +++ b/src/assets/lang/zh-tw/home-assistant.json @@ -12,7 +12,7 @@ "title": "為您的 **Home Assistant 備份** 提供安全的雲端儲存空間", "description": "自動化的零知識 (Zero-Knowledge) 異地備份。源自歐洲,專為最大化隱私與數據控制而打造。", "subtitle": "獲取 {{discount}}% 折扣", - "claimDeal": "只需 {{price}} {{currency}}/月 即可獲得 3 TB" + "claimDeal": "領取優惠" }, "TableSection": { "title": "Internxt 方案", diff --git a/src/assets/lang/zh/home-assistant.json b/src/assets/lang/zh/home-assistant.json index 3f22dab9c..dda1af2d8 100644 --- a/src/assets/lang/zh/home-assistant.json +++ b/src/assets/lang/zh/home-assistant.json @@ -12,7 +12,7 @@ "title": "为您的 **Home Assistant 备份** 提供安全的云存储", "description": "自动化的零知识 (Zero-Knowledge) 异地备份。源自欧洲,专为最大化隐私与数据控制而打造。", "subtitle": "获取 {{discount}}% 折扣", - "claimDeal": "仅需 {{price}} {{currency}}/月 即可获得 3 TB" + "claimDeal": "领取优惠" }, "TableSection": { "title": "Internxt 套餐计划", diff --git a/src/components/home-assistant/HeroSection.tsx b/src/components/home-assistant/HeroSection.tsx index f697743a5..8d36bbd74 100644 --- a/src/components/home-assistant/HeroSection.tsx +++ b/src/components/home-assistant/HeroSection.tsx @@ -16,16 +16,12 @@ import { HighlightText } from '../components/HighlightText'; interface HeroSectionForPartnerProps { textContent: any; percentOff: string; - price: string; - currency: string; darkMode?: boolean; } export default function HeroSection({ textContent, percentOff, - price, - currency, darkMode = false, }: Readonly): JSX.Element { @@ -101,10 +97,7 @@ export default function HeroSection({ href={'#billingButtons'} className="z-10 flex items-center justify-center whitespace-nowrap rounded-sm-6 bg-primary px-7 py-3 text-base font-medium text-white hover:bg-primary-dark" > - {textContent.claimDeal - .replace('{{price}}', price) - .replace('{{currency}}', currency) - } + {textContent.claimDeal} diff --git a/src/pages/ga/home-assistant.tsx b/src/pages/ga/home-assistant.tsx index ad0b03c97..63213195a 100644 --- a/src/pages/ga/home-assistant.tsx +++ b/src/pages/ga/home-assistant.tsx @@ -8,12 +8,11 @@ import usePricing from '@/hooks/usePricing'; import Navbar from '@/components/layout/navbars/Navbar'; import HeroSection from '@/components/home-assistant/HeroSection'; import { PricingSectionWrapper } from '@/components/shared/pricing/PricingSectionWrapper'; -import { Interval, stripeService } from '@/services/stripe.service'; +import { stripeService } from '@/services/stripe.service'; import { HomeAssistantText } from '@/assets/types/home-assistant'; import ThreeCardsIconsSection from '@/components/shared/sections/ThreeCardsIconsSection'; import ConfigurationSection from '@/components/home-assistant/ConfigurationSection'; import HorizontalScrollableSection from '@/components/shared/HorizontalScrollableSection'; -import { get3TBPrice } from '@/utils/priceHelper'; interface HomeAssistantProps { lang: GetServerSidePropsContext['locale']; @@ -31,7 +30,6 @@ const HomeAssistantPage = ({ metatagsDescriptions, langJson, lang, footerLang, n const { products, loadingCards, - currency, currencyValue, coupon: individualCoupon, lifetimeCoupon, @@ -41,7 +39,6 @@ const HomeAssistantPage = ({ metatagsDescriptions, langJson, lang, footerLang, n const percentOff = lifetimeCoupon?.percentOff === undefined ? '0' : String(lifetimeCoupon.percentOff); const decimalDiscountForLifetime = lifetimeCoupon?.percentOff && 100 - lifetimeCoupon.percentOff; const decimalDiscount = individualCoupon?.percentOff && 100 - individualCoupon.percentOff; - const price = get3TBPrice(products, decimalDiscount); const onCheckoutButtonClicked = async ( priceId: string, @@ -75,7 +72,7 @@ const HomeAssistantPage = ({ metatagsDescriptions, langJson, lang, footerLang, n - + diff --git a/src/utils/priceHelper.ts b/src/utils/priceHelper.ts index ab12a2349..d56770f9f 100644 --- a/src/utils/priceHelper.ts +++ b/src/utils/priceHelper.ts @@ -12,16 +12,3 @@ export const getMinimumPrice = ( ?(Math.floor(price * (decimalDiscount / 100) * 100) / 100).toFixed(2) : price.toFixed(2); } - -export const get3TBPrice = ( - products: any, - decimalDiscount?: number -): string => { - const price = Number(products?.individuals?.[Interval.Year]?.[1]?.price); - - if (!price) return '2.99'; - - return decimalDiscount - ?(Math.floor(price * (decimalDiscount / 100) * 100) / 100).toFixed(2) - : price.toFixed(2); -} \ No newline at end of file From 71a3c2bff2c9a92f960dc5c3da5df696451d6704 Mon Sep 17 00:00:00 2001 From: internxt-yu Date: Wed, 19 Aug 2026 13:42:12 +0200 Subject: [PATCH 05/10] changed pricing section to two comparative cards and changed the title of the section --- src/assets/lang/de/home-assistant.json | 2 +- src/assets/lang/en/home-assistant.json | 2 +- src/assets/lang/es/home-assistant.json | 2 +- src/assets/lang/fr/home-assistant.json | 2 +- src/assets/lang/it/home-assistant.json | 2 +- src/assets/lang/ru/home-assistant.json | 2 +- src/assets/lang/zh-tw/home-assistant.json | 2 +- src/assets/lang/zh/home-assistant.json | 2 +- .../pricing/ComparativePricingSection.tsx | 268 ++++++++++++++++++ src/pages/ga/home-assistant.tsx | 23 +- 10 files changed, 285 insertions(+), 22 deletions(-) create mode 100644 src/components/shared/pricing/ComparativePricingSection.tsx diff --git a/src/assets/lang/de/home-assistant.json b/src/assets/lang/de/home-assistant.json index 8211f646f..3e93493d0 100644 --- a/src/assets/lang/de/home-assistant.json +++ b/src/assets/lang/de/home-assistant.json @@ -19,7 +19,7 @@ "valentinesTitle": "Sichere Liebe – ", "hotLabel": "{{discount}}% Rabatt", "planTitles": { - "header": "Wählen Sie Ihren Tarif", + "header": "Wähle deine Zahlungsart", "lifetimeHeader": "Wählen Sie Ihren Lebenslangen Tarif", "individuals": "Jahrestarife", "homePage": "Wählen Sie den passenden Tarif für sich", diff --git a/src/assets/lang/en/home-assistant.json b/src/assets/lang/en/home-assistant.json index 22b259845..658acae31 100644 --- a/src/assets/lang/en/home-assistant.json +++ b/src/assets/lang/en/home-assistant.json @@ -19,7 +19,7 @@ "valentinesTitle": "Secure love - ", "hotLabel": "{{discount}}% off", "planTitles": { - "header": "Select your plan", + "header": "Choose how you want to pay", "lifetimeHeader": "Select your lifetime plan", "individuals": "Annual Plans", "homePage": "Choose the right plan for you", diff --git a/src/assets/lang/es/home-assistant.json b/src/assets/lang/es/home-assistant.json index cedf512a1..fead517d0 100644 --- a/src/assets/lang/es/home-assistant.json +++ b/src/assets/lang/es/home-assistant.json @@ -19,7 +19,7 @@ "valentinesTitle": "Amor seguro - ", "hotLabel": "{{discount}}% de descuento", "planTitles": { - "header": "Selecciona tu plan", + "header": "Elige cómo quieres pagar", "lifetimeHeader": "Selecciona tu plan de por vida", "individuals": "Planes anuales", "homePage": "Elige el plan adecuado para ti", diff --git a/src/assets/lang/fr/home-assistant.json b/src/assets/lang/fr/home-assistant.json index bceb099bf..29ae7c2f2 100644 --- a/src/assets/lang/fr/home-assistant.json +++ b/src/assets/lang/fr/home-assistant.json @@ -19,7 +19,7 @@ "valentinesTitle": "Un amour sécurisé - ", "hotLabel": "{{discount}}% de réduction", "planTitles": { - "header": "Sélectionnez votre offre", + "header": "Choisissez votre mode de paiement", "lifetimeHeader": "Sélectionnez votre offre à vie", "individuals": "Offres annuelles", "homePage": "Choisissez l'offre qui vous convient", diff --git a/src/assets/lang/it/home-assistant.json b/src/assets/lang/it/home-assistant.json index 1ace7abb7..117464975 100644 --- a/src/assets/lang/it/home-assistant.json +++ b/src/assets/lang/it/home-assistant.json @@ -19,7 +19,7 @@ "valentinesTitle": "Amore sicuro - ", "hotLabel": "{{discount}}% di sconto", "planTitles": { - "header": "Seleziona il tuo piano", + "header": "Scegli come vuoi pagare", "lifetimeHeader": "Seleziona il tuo piano a vita", "individuals": "Piani annuali", "homePage": "Scegli il piano ideale per te", diff --git a/src/assets/lang/ru/home-assistant.json b/src/assets/lang/ru/home-assistant.json index 685ef169f..f57e743c8 100644 --- a/src/assets/lang/ru/home-assistant.json +++ b/src/assets/lang/ru/home-assistant.json @@ -19,7 +19,7 @@ "valentinesTitle": "Безопасная любовь - ", "hotLabel": "Скидка {{discount}}%", "planTitles": { - "header": "Выберите ваш тариф", + "header": "Выберите способ оплаты", "lifetimeHeader": "Выберите пожизненный тариф", "individuals": "Годовые тарифы", "homePage": "Выберите подходящий для вас тариф", diff --git a/src/assets/lang/zh-tw/home-assistant.json b/src/assets/lang/zh-tw/home-assistant.json index 4d370f40c..12332e789 100644 --- a/src/assets/lang/zh-tw/home-assistant.json +++ b/src/assets/lang/zh-tw/home-assistant.json @@ -19,7 +19,7 @@ "valentinesTitle": "守護摯愛 - ", "hotLabel": "{{discount}}% 優惠", "planTitles": { - "header": "選擇您的方案", + "header": "選擇你的支付方式", "lifetimeHeader": "選擇您的終身方案", "individuals": "年度方案", "homePage": "選擇最適合您的方案", diff --git a/src/assets/lang/zh/home-assistant.json b/src/assets/lang/zh/home-assistant.json index dda1af2d8..6429576bb 100644 --- a/src/assets/lang/zh/home-assistant.json +++ b/src/assets/lang/zh/home-assistant.json @@ -19,7 +19,7 @@ "valentinesTitle": "守护挚爱 - ", "hotLabel": "{{discount}}% 优惠", "planTitles": { - "header": "选择您的套餐", + "header": "选择你的支付方式", "lifetimeHeader": "选择您的终身套餐", "individuals": "年度套餐", "homePage": "选择最适合您的套餐", diff --git a/src/components/shared/pricing/ComparativePricingSection.tsx b/src/components/shared/pricing/ComparativePricingSection.tsx new file mode 100644 index 000000000..7e86ff335 --- /dev/null +++ b/src/components/shared/pricing/ComparativePricingSection.tsx @@ -0,0 +1,268 @@ +import { Interval, ProductsDataProps } from '@/services/stripe.service'; +import CardSkeleton from '@/components/components/CardSkeleton'; +import { PriceCard } from '@/components/shared/pricing/PriceCard'; +import { HandCoins, Headset, Keyhole, CheckCircle, ArrowDown } from '@phosphor-icons/react'; +import React from 'react'; + +const FULL_PERCENTAGE = 100; +const MINIMUM_DISCOUNT = 0; + +const calculateDiscountPercentage = (decimalValue?: number) => { + if (!decimalValue || decimalValue <= 0) return undefined; + const discountPercentage = FULL_PERCENTAGE - decimalValue; + return discountPercentage > MINIMUM_DISCOUNT ? discountPercentage : undefined; +}; + +const formatDiscountLabel = (label: string, discountValue: number) => { + return label.replace('{{discount}}', discountValue.toString()); +}; + +const couponNameLabel = (label: string, couponName: string) => { + return label.replace('{{coupon}}', `'${couponName}'`); +}; + +const HotLabel = ({ + textContent, + discountValue, + darkMode, + isValentinesMode, +}: { + textContent: any; + discountValue?: number; + darkMode?: boolean; + isValentinesMode?: boolean; +}) => { + if (!discountValue || discountValue <= MINIMUM_DISCOUNT || !textContent?.hotLabel) { + return null; + } + + return ( + + {isValentinesMode ? textContent.valentinesTitle : ''} + {formatDiscountLabel(textContent.hotLabel, discountValue)} + {isValentinesMode ? '💘' : '🔥'} + + ); +}; + +const PricingHeader = ({ + textContent, + discountValue, + className = '', + couponCodeName, + darkMode, + SectionTag, + isValentinesMode, + alternativeHeader, +}: { + textContent: any; + discountValue?: number; + className?: string; + couponCodeName?: string; + darkMode?: boolean; + SectionTag: React.ElementType; + isValentinesMode?: boolean; + alternativeHeader?: boolean; +}) => ( +
+ + {alternativeHeader ? textContent?.planTitles?.lifetimeHeader : textContent?.planTitles?.header} + +
+ +
+
+); + +const CouponCodeHeader = ({ textContent, couponCode }: { textContent: any; couponCode: string }) => ( +
+ +

+ {couponNameLabel(textContent.discountLabel, couponCode)} +

+
+); + +interface ComparativePricingSectionProps { + textContent: Record; + products: ProductsDataProps | undefined; + loadingCards: boolean; + lang: string; + targetStorage?: string; + darkMode?: boolean; + decimalDiscount?: { + individuals?: number; + lifetime?: number; + }; + couponCodeName?: string; + isValentinesMode?: boolean; + alternativeHeader?: boolean; + onCheckoutButtonClicked: ( + planId: string, + isCheckoutForLifetime: boolean, + interval: string, + storage: string, + ) => void; + hideFeatures?: boolean; + sectionDetails?: string; + backgroundGradientColor?: string; + SectionTag?: React.ElementType; +} + +export const ComparativePricingSection = ({ + textContent, + products, + loadingCards, + lang, + targetStorage = '5TB', + darkMode = false, + decimalDiscount, + couponCodeName, + isValentinesMode = false, + alternativeHeader = false, + onCheckoutButtonClicked, + hideFeatures = false, + sectionDetails = 'bg-white py-8 sm:py-10 lg:py-20', + backgroundGradientColor, + SectionTag = 'h2', +}: ComparativePricingSectionProps): JSX.Element => { + const annualPlan = products?.individuals?.[Interval.Year]?.find( + (product) => product.storage === targetStorage, + ); + const lifetimePlan = products?.individuals?.[Interval.Lifetime]?.find( + (product) => product.storage === targetStorage, + ); + + const actualDiscountValue = calculateDiscountPercentage( + decimalDiscount?.lifetime || decimalDiscount?.individuals, + ); + + const features = [ + { + icon: Headset, + text: textContent?.features?.premiumSupport || '24/7 Support', + }, + { + icon: HandCoins, + text: textContent?.features?.guarantee || '30-day money back guarantee', + }, + { + icon: Keyhole, + text: textContent?.features?.openSource || '100% Encrypted & Open Source', + }, + ]; + + return ( +
+
+
+ + {couponCodeName && } +
+ + {loadingCards && ( +
+ + +
+ )} + + {!loadingCards && ( +
+ {annualPlan && ( +
+ +
+ )} + + {lifetimePlan && ( +
+ +
+ )} +
+ )} + + {textContent?.ctaCompare && ( + + {textContent.ctaCompare} + + + )} +
+ {!hideFeatures && ( +
+
+ {features.map((feature) => ( +
+ +

+ {feature.text} +

+
+ ))} +
+
+ )} +
+ ); +}; + +export default ComparativePricingSection; diff --git a/src/pages/ga/home-assistant.tsx b/src/pages/ga/home-assistant.tsx index 63213195a..dd3b2d4a2 100644 --- a/src/pages/ga/home-assistant.tsx +++ b/src/pages/ga/home-assistant.tsx @@ -7,12 +7,12 @@ import { MinimalFooter } from '@/components/layout/footers/MinimalFooter'; import usePricing from '@/hooks/usePricing'; import Navbar from '@/components/layout/navbars/Navbar'; import HeroSection from '@/components/home-assistant/HeroSection'; -import { PricingSectionWrapper } from '@/components/shared/pricing/PricingSectionWrapper'; import { stripeService } from '@/services/stripe.service'; import { HomeAssistantText } from '@/assets/types/home-assistant'; import ThreeCardsIconsSection from '@/components/shared/sections/ThreeCardsIconsSection'; import ConfigurationSection from '@/components/home-assistant/ConfigurationSection'; import HorizontalScrollableSection from '@/components/shared/HorizontalScrollableSection'; +import ComparativePricingSection from '@/components/shared/pricing/ComparativePricingSection'; interface HomeAssistantProps { lang: GetServerSidePropsContext['locale']; @@ -33,7 +33,7 @@ const HomeAssistantPage = ({ metatagsDescriptions, langJson, lang, footerLang, n currencyValue, coupon: individualCoupon, lifetimeCoupon, - lifetimeCoupons, + // lifetimeCoupons, } = usePricing({ couponCode: PromoCodeName.GADS85, couponCodeForLifetime: PromoCodeName.GADS85 }); const percentOff = lifetimeCoupon?.percentOff === undefined ? '0' : String(lifetimeCoupon.percentOff); @@ -74,24 +74,19 @@ const HomeAssistantPage = ({ metatagsDescriptions, langJson, lang, footerLang, n - + From 3d1b209382b169f0f15fa472401f7a8d1ed50de8 Mon Sep 17 00:00:00 2001 From: internxt-yu Date: Wed, 19 Aug 2026 14:13:14 +0200 Subject: [PATCH 06/10] changes for sonarqube analysis --- .../shared/pricing/ComparativePricingSection.tsx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/components/shared/pricing/ComparativePricingSection.tsx b/src/components/shared/pricing/ComparativePricingSection.tsx index 7e86ff335..667c47387 100644 --- a/src/components/shared/pricing/ComparativePricingSection.tsx +++ b/src/components/shared/pricing/ComparativePricingSection.tsx @@ -36,14 +36,18 @@ const HotLabel = ({ return null; } + const labelColorClass = isValentinesMode + ? 'flex gap-0.5 bg-pink-10 text-pink-80' + : 'bg-neutral-37 text-primary'; + + const darkModeLabelClass = darkMode + ? 'bg-purple-100 text-purple-8' + : labelColorClass; + return ( {isValentinesMode ? textContent.valentinesTitle : ''} From 1c880f9fb0f4da402ba354ee23da5ee758c06dd1 Mon Sep 17 00:00:00 2001 From: internxt-yu Date: Wed, 19 Aug 2026 16:32:26 +0200 Subject: [PATCH 07/10] changed order of components --- src/pages/ga/home-assistant.tsx | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/pages/ga/home-assistant.tsx b/src/pages/ga/home-assistant.tsx index dd3b2d4a2..eff4bb15c 100644 --- a/src/pages/ga/home-assistant.tsx +++ b/src/pages/ga/home-assistant.tsx @@ -33,7 +33,6 @@ const HomeAssistantPage = ({ metatagsDescriptions, langJson, lang, footerLang, n currencyValue, coupon: individualCoupon, lifetimeCoupon, - // lifetimeCoupons, } = usePricing({ couponCode: PromoCodeName.GADS85, couponCodeForLifetime: PromoCodeName.GADS85 }); const percentOff = lifetimeCoupon?.percentOff === undefined ? '0' : String(lifetimeCoupon.percentOff); @@ -74,6 +73,13 @@ const HomeAssistantPage = ({ metatagsDescriptions, langJson, lang, footerLang, n + + + + - - - - - Date: Mon, 24 Aug 2026 08:46:07 +0200 Subject: [PATCH 08/10] changed promo phrase and adjust for hero image --- src/assets/lang/de/home-assistant.json | 2 +- src/assets/lang/en/home-assistant.json | 2 +- src/assets/lang/es/home-assistant.json | 2 +- src/assets/lang/fr/home-assistant.json | 2 +- src/components/home-assistant/HeroSection.tsx | 12 +++++------- 5 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/assets/lang/de/home-assistant.json b/src/assets/lang/de/home-assistant.json index 3e93493d0..b7fdaca78 100644 --- a/src/assets/lang/de/home-assistant.json +++ b/src/assets/lang/de/home-assistant.json @@ -11,7 +11,7 @@ }, "title": "Sicherer Cloud-Speicher für Ihre **Home Assistant-Backups**", "description": "Automatisierte Offsite-Backups nach dem Zero-Knowledge-Prinzip. Entwickelt in Europa für maximale Privatsphäre und Datenkontrolle.", - "subtitle": "Holen Sie sich {{discount}}% Rabatt", + "subtitle": "Erhalten Sie {{discount}}% Rabatt", "claimDeal": "Angebot sichern" }, "TableSection": { diff --git a/src/assets/lang/en/home-assistant.json b/src/assets/lang/en/home-assistant.json index 658acae31..e598fbcb4 100644 --- a/src/assets/lang/en/home-assistant.json +++ b/src/assets/lang/en/home-assistant.json @@ -11,7 +11,7 @@ }, "title": "Secure cloud storage for your **Home Assistant Backups**", "description": "Automated, zero-knowledge offsite backups. Built in Europe for maximum privacy and data control.", - "subtitle": "Get {{discount}}% of discount ", + "subtitle": "Get {{discount}}% off ", "claimDeal": "Claim deal" }, "TableSection": { diff --git a/src/assets/lang/es/home-assistant.json b/src/assets/lang/es/home-assistant.json index fead517d0..b607976ec 100644 --- a/src/assets/lang/es/home-assistant.json +++ b/src/assets/lang/es/home-assistant.json @@ -11,7 +11,7 @@ }, "title": "Almacenamiento en la nube seguro para tus **copias de seguridad de Home Assistant**", "description": "Copias de seguridad externas automatizadas con conocimiento cero (zero-knowledge). Creado en Europa para el máximo control de datos y privacidad.", - "subtitle": "Consigue un {{discount}}% de descuento", + "subtitle": "Obtén un {{discount}}% de descuento", "claimDeal": "Reclamar oferta" }, "TableSection": { diff --git a/src/assets/lang/fr/home-assistant.json b/src/assets/lang/fr/home-assistant.json index 29ae7c2f2..206ec07a2 100644 --- a/src/assets/lang/fr/home-assistant.json +++ b/src/assets/lang/fr/home-assistant.json @@ -11,7 +11,7 @@ }, "title": "Stockage cloud sécurisé para vos **sauvegardes Home Assistant**", "description": "Sauvegardes distantes automatisées à connaissance nulle (zero-knowledge). Conçu en Europe pour une confidentialité et un contrôle des données maximaux.", - "subtitle": "Obtenez {{discount}}% de réduction", + "subtitle": "Obtenez {{discount}}% de réduction ", "claimDeal": "Profiter de l'offre" }, "TableSection": { diff --git a/src/components/home-assistant/HeroSection.tsx b/src/components/home-assistant/HeroSection.tsx index 8d36bbd74..e32426caf 100644 --- a/src/components/home-assistant/HeroSection.tsx +++ b/src/components/home-assistant/HeroSection.tsx @@ -41,14 +41,14 @@ export default function HeroSection({ return (
-
+
{products.map((feature, index) => (
Internxt Partners HeroSection Image
From 78b41ebd260f644a8a080dbf4acd535440c69eac Mon Sep 17 00:00:00 2001 From: internxt-yu Date: Mon, 24 Aug 2026 09:46:05 +0200 Subject: [PATCH 09/10] change for sonarqube analysis --- src/components/home-assistant/HeroSection.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/home-assistant/HeroSection.tsx b/src/components/home-assistant/HeroSection.tsx index e32426caf..2b6bf0f66 100644 --- a/src/components/home-assistant/HeroSection.tsx +++ b/src/components/home-assistant/HeroSection.tsx @@ -50,9 +50,9 @@ export default function HeroSection({ >
- {products.map((feature, index) => ( + {products.map((feature) => (
From 39e0cf8461fb15461b2b29f1d76540ce2a64dafc Mon Sep 17 00:00:00 2001 From: internxt-yu Date: Mon, 24 Aug 2026 15:06:15 +0200 Subject: [PATCH 10/10] adjust spacing and components alignments --- .../home-assistant/ConfigurationSection.tsx | 35 ++++++++++--------- .../pricing/ComparativePricingSection.tsx | 4 +-- 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/src/components/home-assistant/ConfigurationSection.tsx b/src/components/home-assistant/ConfigurationSection.tsx index b05c8afe5..5affe5286 100644 --- a/src/components/home-assistant/ConfigurationSection.tsx +++ b/src/components/home-assistant/ConfigurationSection.tsx @@ -8,49 +8,52 @@ interface ConfigurationSectionProps { const ConfigurationSection = ({ textContent }: ConfigurationSectionProps): JSX.Element => { return ( -
-
-

+
+
+

{textContent.title}

-

- +

{textContent.description}

-
-
+
+
configuration-image
-
+
{textContent.accordionCard.titles.map((title: string, index: number) => ( -
- +
+ {index + 1} -

{title}

+

+ {title} +

-
+
{textContent.accordionCard.descriptions[index]}
))} -
+
{textContent.features.map((title: string) => (
{title}
))}
-
diff --git a/src/components/shared/pricing/ComparativePricingSection.tsx b/src/components/shared/pricing/ComparativePricingSection.tsx index 667c47387..2e09077cf 100644 --- a/src/components/shared/pricing/ComparativePricingSection.tsx +++ b/src/components/shared/pricing/ComparativePricingSection.tsx @@ -206,7 +206,7 @@ export const ComparativePricingSection = ({ {!loadingCards && (
{annualPlan && ( -
+
+