From 81058d881954dedac0cd9dd2458946fe18c7908b Mon Sep 17 00:00:00 2001 From: jaaaaavier Date: Thu, 4 Jun 2026 17:09:48 +0200 Subject: [PATCH 1/2] feat: new antivirus LP for yepads --- src/components/antivirus/FeatureSection.tsx | 7 +- src/components/antivirus/HeroSection.tsx | 12 +- src/pages/ultimate/antivirus.tsx | 222 ++++++++++++++++++++ 3 files changed, 236 insertions(+), 5 deletions(-) create mode 100644 src/pages/ultimate/antivirus.tsx diff --git a/src/components/antivirus/FeatureSection.tsx b/src/components/antivirus/FeatureSection.tsx index 8b9b5b447..48a755e14 100644 --- a/src/components/antivirus/FeatureSection.tsx +++ b/src/components/antivirus/FeatureSection.tsx @@ -7,9 +7,10 @@ import Link from 'next/link'; export interface FeatureSectionProps { textContent: AntivirusText['FeatureSection']; isGetAntivirus?: boolean; + showPlan?: boolean; } -const FeatureSection = ({ textContent, isGetAntivirus }: FeatureSectionProps) => { +const FeatureSection = ({ textContent, isGetAntivirus, showPlan = false }: FeatureSectionProps) => { const cards = [ { icon: '/images/antivirus/internxt_antivirus_1.webp', @@ -48,9 +49,9 @@ const FeatureSection = ({ textContent, isGetAntivirus }: FeatureSectionProps) =>

{formattedDescription}

- + {textContent.cta} diff --git a/src/components/antivirus/HeroSection.tsx b/src/components/antivirus/HeroSection.tsx index e09bf9091..7305952a2 100644 --- a/src/components/antivirus/HeroSection.tsx +++ b/src/components/antivirus/HeroSection.tsx @@ -3,7 +3,13 @@ import Image from 'next/image'; import DownloadComponent from './DownloadComponent'; import { isMobile } from 'react-device-detect'; -const HeroSection = ({ textContent, download }) => ( +interface HeroSectionProps { + textContent: any; + download: any; + needsDownloadSection?: boolean; +} + +const HeroSection = ({ textContent, download, needsDownloadSection }: HeroSectionProps) => (
@@ -60,7 +66,9 @@ const HeroSection = ({ textContent, download }) => (
- {!isMobile && } + {needsDownloadSection && !isMobile && ( + + )}
); diff --git a/src/pages/ultimate/antivirus.tsx b/src/pages/ultimate/antivirus.tsx new file mode 100644 index 000000000..c95125fb9 --- /dev/null +++ b/src/pages/ultimate/antivirus.tsx @@ -0,0 +1,222 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +import { GetServerSidePropsContext } from 'next'; +import { FooterText, MetatagsDescription, NavigationBarText } from '@/assets/types/layout/types'; +import Layout from '@/components/layout/Layout'; +import { MinimalNavbar } from '@/components/layout/navbars/MinimalNavbar'; +import { CardGroup } from '@/components/shared/CardGroup'; +import { ComponentsInColumnSection } from '@/components/shared/components/ComponentsInColumnSection'; +import CtaSection from '@/components/shared/CtaSection'; +import FAQSection from '@/components/shared/sections/FaqSection'; +import cookies from '@/lib/cookies'; +import { BatteryCharging, Bomb, Broom, Browsers, Devices, ShieldCheck, ThermometerHot } from '@phosphor-icons/react'; +import { AntivirusText } from '@/assets/types/antivirus'; +import FeatureSectionV2 from '@/components/antivirus/FeatureSectionV2'; +import FeatureSection from '@/components/antivirus/FeatureSection'; +import HeroSection from '@/components/antivirus/HeroSection'; +import { InfoSection } from '@/components/antivirus/InfoSecction'; +import { downloadDriveLinks } from '@/lib/get-download-url'; +import { MinimalFooter } from '@/components/layout/footers/MinimalFooter'; +import { HorizontalPriceCard } from '@/components/shared/pricing/PriceCard/HorizontalPriceCard'; +import usePricing from '@/hooks/usePricing'; +import { Interval } from '@/services/stripe.service'; + +interface AntivirusProps { + lang: GetServerSidePropsContext['locale']; + metatagsDescriptions: MetatagsDescription[]; + navbarLang: NavigationBarText; + langJson: AntivirusText; + footerLang: FooterText; + relationalLinksText: any; + download: { + Windows: any; + MacOS: any; + Linux: any; + }; + isGetAntivirus?: boolean; +} + +const AntivirusPage = ({ + metatagsDescriptions, + langJson, + lang, + footerLang, + download, + isGetAntivirus, +}: AntivirusProps): JSX.Element => { + const metatags = metatagsDescriptions.filter((desc) => desc.id === 'internxt-antivirus'); + const locale = lang as string; + + const cardsForComponentsIncolumn = [ + { + icon: BatteryCharging, + title: langJson.ComponentsInColumn.cards.element1.title, + description: langJson.ComponentsInColumn.cards.element1.description, + }, + { + icon: Bomb, + title: langJson.ComponentsInColumn.cards.element2.title, + description: langJson.ComponentsInColumn.cards.element2.description, + }, + { + icon: Browsers, + title: langJson.ComponentsInColumn.cards.element3.title, + description: langJson.ComponentsInColumn.cards.element3.description, + }, + { + icon: ThermometerHot, + title: langJson.ComponentsInColumn.cards.element4.title, + description: langJson.ComponentsInColumn.cards.element4.description, + }, + ]; + const infoSectionData = [ + { + title: langJson.InfoSection.Percentage, + description: langJson.InfoSection.PercentageText, + }, + { + title: langJson.InfoSection.MalwareRegisteredDaily, + description: langJson.InfoSection.MalwareRegisteredDailyText, + }, + { + title: langJson.InfoSection.MalwareAttacks, + description: langJson.InfoSection.MalwareAttacksText, + }, + ]; + + const InfoSectionV2 = [ + { + icon: ShieldCheck, + title: langJson.InfoSectionV2.AntivirusProtection, + }, + { + icon: Broom, + title: langJson.InfoSectionV2.RemoveMalware, + }, + { + icon: Devices, + title: langJson.InfoSectionV2.DeviceProtection, + }, + ]; + + const { products, currency, currencyValue, lifetimeCoupon } = usePricing({}); + + const ultimatePlan = products?.individuals?.[Interval.Year]?.find((plan: any) => plan.storage === '5TB'); + const decimalDiscountForLifetime = lifetimeCoupon?.percentOff && 100 - lifetimeCoupon.percentOff; + + return ( + <> + + + + + + + {infoSectionData.map((item, index) => ( +
+

{item.title}

+

{item.description}

+
+ ))} + + } + /> + + {ultimatePlan && ( +
+ +
+ )} + + + + + {InfoSectionV2.map((item, index) => ( +
+ +

{item.title}

+
+ ))} + + } + /> + + {langJson.cta1.subtitle}

} + /> + + + + +
+

+ {langJson.ComponentsInColumn.title} +

+

{langJson.ComponentsInColumn.description}

+
+ + } + SecondComponent={ +
+ +
+ } + backgroundColor="bg-gray-1" + /> + {langJson.cta2.subtitle}

} + /> + + + + +
+ + ); +}; + +export async function getServerSideProps(ctx: GetServerSidePropsContext) { + const download = await downloadDriveLinks(); + const lang = ctx.locale; + + const metatagsDescriptions = require(`@/assets/lang/${lang}/metatags-descriptions.json`); + const langJson = require(`@/assets/lang/${lang}/antivirus.json`); + const navbarLang = require(`@/assets/lang/${lang}/navbar.json`); + const footerLang = require(`@/assets/lang/${lang}/footer.json`); + const relationalLinksText = require(`@/assets/lang/${lang}/relational-links.json`); + + cookies.setReferralCookie(ctx); + + return { + props: { + lang, + metatagsDescriptions, + langJson, + navbarLang, + footerLang, + download, + relationalLinksText, + }, + }; +} + +export default AntivirusPage; From 8a6161a076f2eee2c25af475d55cf6dd0758e591 Mon Sep 17 00:00:00 2001 From: jaaaaavier Date: Fri, 5 Jun 2026 09:46:08 +0200 Subject: [PATCH 2/2] feat: new design --- src/assets/lang/de/antivirus.json | 7 +- src/assets/lang/de/navbar.json | 7 +- src/assets/lang/en/antivirus.json | 12 ++- src/assets/lang/en/navbar.json | 7 +- src/assets/lang/es/antivirus.json | 7 +- src/assets/lang/es/navbar.json | 7 +- src/assets/lang/fr/antivirus.json | 7 +- src/assets/lang/fr/navbar.json | 7 +- src/assets/lang/it/antivirus.json | 7 +- src/assets/lang/it/navbar.json | 7 +- src/assets/lang/pt-br/antivirus.json | 7 +- src/assets/lang/pt-br/navbar.json | 7 +- src/assets/lang/ru/antivirus.json | 7 +- src/assets/lang/ru/navbar.json | 7 +- src/assets/lang/zh-tw/antivirus.json | 7 +- src/assets/lang/zh-tw/navbar.json | 7 +- src/assets/lang/zh/antivirus.json | 7 +- src/assets/lang/zh/navbar.json | 7 +- src/assets/types/layout/types.ts | 5 + .../antivirus/AlternativeHeroSection.tsx | 91 +++++++++++++++++++ src/components/antivirus/FeatureSection.tsx | 14 +-- src/components/antivirus/HeroSection.tsx | 4 +- src/components/antivirus/InfoSecction.tsx | 2 +- .../layout/navbars/MinimalNavbar.tsx | 52 ++++++++--- .../pricing/PriceCard/HorizontalPriceCard.tsx | 6 +- src/lib/types/index.ts | 1 + src/pages/ultimate/antivirus.tsx | 21 +++-- 27 files changed, 263 insertions(+), 64 deletions(-) create mode 100644 src/components/antivirus/AlternativeHeroSection.tsx diff --git a/src/assets/lang/de/antivirus.json b/src/assets/lang/de/antivirus.json index c056b2b41..84ef22f4e 100644 --- a/src/assets/lang/de/antivirus.json +++ b/src/assets/lang/de/antivirus.json @@ -133,5 +133,8 @@ "AntivirusProtection": "Antivirenschutz für Ihre Dateien", "RemoveMalware": "Entfernt jegliche Schadsoftware (Malware)", "DeviceProtection": "Schützt Ihre Geräte" - } -} + }, + "secondaryEyeBrow": "Antivirus", + "cta": "Internxt erhalten", + "price": "Ab {currency}29,99/Monat" +} \ No newline at end of file diff --git a/src/assets/lang/de/navbar.json b/src/assets/lang/de/navbar.json index 8e003191f..762d652bb 100644 --- a/src/assets/lang/de/navbar.json +++ b/src/assets/lang/de/navbar.json @@ -107,5 +107,10 @@ "subtitle": "Wir haben einen Link zum Zurücksetzen des Kontos gesendet an" } } + }, + "MinimalNavbar": { + "secondaryEyeBrow": "Antivirus", + "cta": "Internxt erhalten", + "price": "Ab {currency}29,99/Monat" } -} +} \ No newline at end of file diff --git a/src/assets/lang/en/antivirus.json b/src/assets/lang/en/antivirus.json index bf3a12051..3f401b3d5 100644 --- a/src/assets/lang/en/antivirus.json +++ b/src/assets/lang/en/antivirus.json @@ -4,12 +4,15 @@ "blueText": "Internxt Antivirus", "description": "Defend against malware, phishing, and ransomware with advanced protection hat keeps your files safe.", "eyeBrow": "Internxt Antivirus", + "secondaryEyeBrow": "Antivirus", "DownloadLinks": { "downloadTitle": "Download Internxt Antivirus", "downloadForMac": "Download for Mac", "downloadForWindows": "Download for Windows", "downloadForLinux": "Download for Linux" - } + }, + "cta": "Get Internxt", + "price": "From €29.99/mo" }, "cta1": { "title": "Internxt Antivirus", @@ -134,5 +137,8 @@ "AntivirusProtection": "Antivirus protection", "RemoveMalware": "Remove malware", "DeviceProtection": "Device protection" - } -} + }, + "secondaryEyeBrow": "Antivirus", + "cta": "Get Internxt", + "price": "From {currency}29.99/mo" +} \ No newline at end of file diff --git a/src/assets/lang/en/navbar.json b/src/assets/lang/en/navbar.json index c71b7e888..e50acd8f8 100644 --- a/src/assets/lang/en/navbar.json +++ b/src/assets/lang/en/navbar.json @@ -107,5 +107,10 @@ "subtitle": "We've send an account reset link to" } } + }, + "MinimalNavbar": { + "secondaryEyeBrow": "Antivirus", + "cta": "Get Internxt", + "price": "From {currency}29.99/mo" } -} +} \ No newline at end of file diff --git a/src/assets/lang/es/antivirus.json b/src/assets/lang/es/antivirus.json index d2e36d4a8..e011d4bd6 100644 --- a/src/assets/lang/es/antivirus.json +++ b/src/assets/lang/es/antivirus.json @@ -134,5 +134,8 @@ "AntivirusProtection": "Protección antivirus para tus archivos", "RemoveMalware": "Elimina cualquier programa malicioso (malware)", "DeviceProtection": "Protege tus dispositivos" - } -} + }, + "secondaryEyeBrow": "Antivirus", + "cta": "Obtener Internxt", + "price": "Desde {currency}29,99/mes" +} \ No newline at end of file diff --git a/src/assets/lang/es/navbar.json b/src/assets/lang/es/navbar.json index de3bec863..37666ba57 100644 --- a/src/assets/lang/es/navbar.json +++ b/src/assets/lang/es/navbar.json @@ -106,5 +106,10 @@ "subtitle": "Te hemos enviado un link de reseteo a" } } + }, + "MinimalNavbar": { + "secondaryEyeBrow": "Antivirus", + "cta": "Obtener Internxt", + "price": "Desde {currency}29,99/mes" } -} +} \ No newline at end of file diff --git a/src/assets/lang/fr/antivirus.json b/src/assets/lang/fr/antivirus.json index 7f9117b0e..a0026a9ae 100644 --- a/src/assets/lang/fr/antivirus.json +++ b/src/assets/lang/fr/antivirus.json @@ -133,5 +133,8 @@ "AntivirusProtection": "Protection antivirus pour vos fichiers", "RemoveMalware": "Élimine tout logiciel malveillant (malware)", "DeviceProtection": "Protège vos dispositifs" - } -} + }, + "secondaryEyeBrow": "Antivirus", + "cta": "Obtenir Internxt", + "price": "À partir de {currency}29,99/mois" +} \ No newline at end of file diff --git a/src/assets/lang/fr/navbar.json b/src/assets/lang/fr/navbar.json index cbf9f9447..2db0c704e 100644 --- a/src/assets/lang/fr/navbar.json +++ b/src/assets/lang/fr/navbar.json @@ -106,5 +106,10 @@ "subtitle": "Nous vous avons envoyé un lien de réinitialisation pour" } } + }, + "MinimalNavbar": { + "secondaryEyeBrow": "Antivirus", + "cta": "Obtenir Internxt", + "price": "À partir de {currency}29,99/mois" } -} +} \ No newline at end of file diff --git a/src/assets/lang/it/antivirus.json b/src/assets/lang/it/antivirus.json index 6d859146f..63fb70bff 100644 --- a/src/assets/lang/it/antivirus.json +++ b/src/assets/lang/it/antivirus.json @@ -133,5 +133,8 @@ "AntivirusProtection": "Protezione antivirus per i tuoi file", "RemoveMalware": "Elimina qualsiasi programma dannoso (malware)", "DeviceProtection": "Proteggi i tuoi dispositivi" - } -} + }, + "secondaryEyeBrow": "Antivirus", + "cta": "Ottieni Internxt", + "price": "Da {currency}29,99/mese" +} \ No newline at end of file diff --git a/src/assets/lang/it/navbar.json b/src/assets/lang/it/navbar.json index 8932f9274..bc8660206 100644 --- a/src/assets/lang/it/navbar.json +++ b/src/assets/lang/it/navbar.json @@ -107,5 +107,10 @@ "subtitle": "We've send an account reset link to" } } + }, + "MinimalNavbar": { + "secondaryEyeBrow": "Antivirus", + "cta": "Ottieni Internxt", + "price": "Da {currency}29,99/mese" } -} +} \ No newline at end of file diff --git a/src/assets/lang/pt-br/antivirus.json b/src/assets/lang/pt-br/antivirus.json index 08eb149d9..5ea8d672e 100644 --- a/src/assets/lang/pt-br/antivirus.json +++ b/src/assets/lang/pt-br/antivirus.json @@ -133,5 +133,8 @@ "AntivirusProtection": "Proteção antivirus para seus arquivos", "RemoveMalware": "Remove qualquer programa malicioso (malware)", "DeviceProtection": "Protege seus dispositivos" - } -} + }, + "secondaryEyeBrow": "Antivirus", + "cta": "Obtenha o Internxt", + "price": "A partir de {currency}29,99/mês" +} \ No newline at end of file diff --git a/src/assets/lang/pt-br/navbar.json b/src/assets/lang/pt-br/navbar.json index ccaf716af..a1d9652d3 100644 --- a/src/assets/lang/pt-br/navbar.json +++ b/src/assets/lang/pt-br/navbar.json @@ -91,5 +91,10 @@ "subtitle": "Enviamos um link de redefinição de conta para" } } + }, + "MinimalNavbar": { + "secondaryEyeBrow": "Antivirus", + "cta": "Obtenha o Internxt", + "price": "A partir de {currency}29,99/mês" } -} +} \ No newline at end of file diff --git a/src/assets/lang/ru/antivirus.json b/src/assets/lang/ru/antivirus.json index ba4ceed9f..bca85aead 100644 --- a/src/assets/lang/ru/antivirus.json +++ b/src/assets/lang/ru/antivirus.json @@ -133,5 +133,8 @@ "AntivirusProtection": "Антивирусная защита для ваших файлов", "RemoveMalware": "Удаляет любые вредоносные программы (malware)", "DeviceProtection": "Защищает ваши устройства" - } -} + }, + "secondaryEyeBrow": "Антивирус", + "cta": "Получить Internxt", + "price": "От {currency}29,99/мес" +} \ No newline at end of file diff --git a/src/assets/lang/ru/navbar.json b/src/assets/lang/ru/navbar.json index f35e482d9..c10aed7dc 100644 --- a/src/assets/lang/ru/navbar.json +++ b/src/assets/lang/ru/navbar.json @@ -107,5 +107,10 @@ "subtitle": "Мы отправили ссылку на сброс настроек аккаунта." } } + }, + "MinimalNavbar": { + "secondaryEyeBrow": "Антивирус", + "cta": "Получить Internxt", + "price": "От {currency}29,99/мес" } -} +} \ No newline at end of file diff --git a/src/assets/lang/zh-tw/antivirus.json b/src/assets/lang/zh-tw/antivirus.json index b459de71a..a53d75d53 100644 --- a/src/assets/lang/zh-tw/antivirus.json +++ b/src/assets/lang/zh-tw/antivirus.json @@ -133,5 +133,8 @@ "AntivirusProtection": "为您的文件提供杀毒保护", "RemoveMalware": "清除任何恶意程序(恶意软件)", "DeviceProtection": "保护您的设备" - } -} + }, + "secondaryEyeBrow": "防毒軟體", + "cta": "取得 Internxt", + "price": "從 {currency}29.99/月" +} \ No newline at end of file diff --git a/src/assets/lang/zh-tw/navbar.json b/src/assets/lang/zh-tw/navbar.json index 8d2e0f631..04f1f346a 100644 --- a/src/assets/lang/zh-tw/navbar.json +++ b/src/assets/lang/zh-tw/navbar.json @@ -107,5 +107,10 @@ "subtitle": "我們已經發送了帳戶重置鏈接到" } } + }, + "MinimalNavbar": { + "secondaryEyeBrow": "防毒軟體", + "cta": "取得 Internxt", + "price": "從 {currency}29.99/月" } -} +} \ No newline at end of file diff --git a/src/assets/lang/zh/antivirus.json b/src/assets/lang/zh/antivirus.json index bc54ffb56..f28d6b4a8 100644 --- a/src/assets/lang/zh/antivirus.json +++ b/src/assets/lang/zh/antivirus.json @@ -133,5 +133,8 @@ "AntivirusProtection": "为您的文件提供杀毒保护", "RemoveMalware": "清除任何恶意程序(恶意软件)", "DeviceProtection": "保护您的设备" - } -} + }, + "secondaryEyeBrow": "杀毒软件", + "cta": "获取 Internxt", + "price": "从 {currency}29.99/月" +} \ No newline at end of file diff --git a/src/assets/lang/zh/navbar.json b/src/assets/lang/zh/navbar.json index 398e3f2e8..066628893 100644 --- a/src/assets/lang/zh/navbar.json +++ b/src/assets/lang/zh/navbar.json @@ -107,5 +107,10 @@ "subtitle": "We've send an account reset link to" } } + }, + "MinimalNavbar": { + "secondaryEyeBrow": "杀毒软件", + "cta": "获取 Internxt", + "price": "从 {currency}29.99/月" } -} +} \ No newline at end of file diff --git a/src/assets/types/layout/types.ts b/src/assets/types/layout/types.ts index 7e4bbe4ba..eeac22301 100644 --- a/src/assets/types/layout/types.ts +++ b/src/assets/types/layout/types.ts @@ -13,6 +13,11 @@ export interface NavigationBarText { products: Products; ourValues: OurValues; Auth: Auth; + MinimalNavbar: { + secondaryEyeBrow: string; + cta: string; + price: string; + }; } export interface FooterText { diff --git a/src/components/antivirus/AlternativeHeroSection.tsx b/src/components/antivirus/AlternativeHeroSection.tsx new file mode 100644 index 000000000..2bd72bcde --- /dev/null +++ b/src/components/antivirus/AlternativeHeroSection.tsx @@ -0,0 +1,91 @@ +import { getImage } from '@/lib/getImage'; +import Image from 'next/image'; +import Link from 'next/link'; + +interface AlternativeHeroSectionProps { + textContent: any; +} + +const AlternativeHeroSection = ({ textContent }: AlternativeHeroSectionProps) => ( +
+
+
+
+

+ {textContent.secondaryEyeBrow} +

+
+ +

+ {textContent.title}
+ {textContent.blueText} +

+ +

{textContent.description}

+ +
+ + {textContent.cta} + + + + {textContent.price} + +
+
+ +
+ Internxt Antivirus + +
+ Internxt Antivirus checklist + + Internxt Antivirus shield + + Internxt Antivirus person checking +
+
+
+
+); + +export default AlternativeHeroSection; diff --git a/src/components/antivirus/FeatureSection.tsx b/src/components/antivirus/FeatureSection.tsx index 48a755e14..eb6dcd7ec 100644 --- a/src/components/antivirus/FeatureSection.tsx +++ b/src/components/antivirus/FeatureSection.tsx @@ -41,23 +41,23 @@ const FeatureSection = ({ textContent, isGetAntivirus, showPlan = false }: Featu
-

+ {textContent.title}
- {textContent.titleLine2} -

+

{textContent.titleLine2}

+

{formattedDescription}

{textContent.cta} -
+
{cards.map((card, index) => { const isEven = index % 2 === 0; @@ -65,7 +65,7 @@ const FeatureSection = ({ textContent, isGetAntivirus, showPlan = false }: Featu
diff --git a/src/components/antivirus/HeroSection.tsx b/src/components/antivirus/HeroSection.tsx index 7305952a2..70e81ab1a 100644 --- a/src/components/antivirus/HeroSection.tsx +++ b/src/components/antivirus/HeroSection.tsx @@ -66,9 +66,7 @@ const HeroSection = ({ textContent, download, needsDownloadSection }: HeroSectio
- {needsDownloadSection && !isMobile && ( - - )} + {!isMobile && }
); diff --git a/src/components/antivirus/InfoSecction.tsx b/src/components/antivirus/InfoSecction.tsx index 248868baa..0e373a693 100644 --- a/src/components/antivirus/InfoSecction.tsx +++ b/src/components/antivirus/InfoSecction.tsx @@ -6,7 +6,7 @@ export interface InfoSectionProps { export const InfoSection: React.FC = ({ FirstComponent }) => { return ( -
+
{FirstComponent}
); diff --git a/src/components/layout/navbars/MinimalNavbar.tsx b/src/components/layout/navbars/MinimalNavbar.tsx index 973621ddf..de6708577 100644 --- a/src/components/layout/navbars/MinimalNavbar.tsx +++ b/src/components/layout/navbars/MinimalNavbar.tsx @@ -1,9 +1,19 @@ import { getImage } from '@/lib/getImage'; -import Link from 'next/link'; import { useState, useEffect } from 'react'; +import Image from 'next/image'; +import router from 'next/router'; +import { currencyService } from '@/services/currency.service'; +import { NavigationBarText } from '@/assets/types/layout/types'; -export const MinimalNavbar = ({ lang }) => { +export interface MinimalNavbarProps { + lang: string; + isOffer?: boolean; + textContent?: NavigationBarText; +} + +export const MinimalNavbar = ({ isOffer, textContent }: MinimalNavbarProps) => { const [scrolled, setScrolled] = useState(true); + const [currencySymbol, setCurrencySymbol] = useState('€'); const handleScroll = () => setScrolled(window.pageYOffset > 0); @@ -12,6 +22,14 @@ export const MinimalNavbar = ({ lang }) => { window.addEventListener('scroll', handleScroll); }); + useEffect(() => { + currencyService.filterCurrencyByCountry().then(({ currency }) => { + setCurrencySymbol(currency); + }); + }, []); + + const priceLabel = textContent?.MinimalNavbar.price.replace('{currency}', currencySymbol); + return (