diff --git a/src/components/cloud-object-storage/HeroSection.tsx b/src/components/cloud-object-storage/HeroSection.tsx index b787b08df..0295d1493 100644 --- a/src/components/cloud-object-storage/HeroSection.tsx +++ b/src/components/cloud-object-storage/HeroSection.tsx @@ -2,8 +2,13 @@ import Image from 'next/image'; import Link from 'next/link'; import { HighlightText } from '../components/HighlightText'; import { getImage } from '@/lib/getImage'; +import { PromoCodeName } from '@/lib/types'; + +export const HeroSection = ({ textContent, couponCode }: { textContent; couponCode?: PromoCodeName }) => { + const checkoutUrl = couponCode + ? `/cloud-object-storage/checkout?couponCode=${couponCode}` + : '/cloud-object-storage/checkout'; -export const HeroSection = ({ textContent }) => { return (
{

{textContent.description}

{textContent.cta} diff --git a/src/components/cloud-object-storage/PriceCardSection.tsx b/src/components/cloud-object-storage/PriceCardSection.tsx index e8ef37119..802ef24ad 100644 --- a/src/components/cloud-object-storage/PriceCardSection.tsx +++ b/src/components/cloud-object-storage/PriceCardSection.tsx @@ -6,13 +6,18 @@ import { useRouter } from 'next/navigation'; import Image from 'next/image'; import { Code, CodeBlock, Gauge, HandCoins, Headset, LockSimple, Resize, Star } from '@phosphor-icons/react'; import { currencyService } from '@/services/currency.service'; +import { PromoCodeName } from '@/lib/types'; import { useEffect, useState } from 'react'; interface PriceCardSectionProps { textContent: CloudObjectStorageText['PriceCardSection']; + couponCode?: PromoCodeName; } -export const CloudObjectStoragePriceCardSection = ({ textContent }: PriceCardSectionProps): JSX.Element => { +export const CloudObjectStoragePriceCardSection = ({ + textContent, + couponCode, +}: PriceCardSectionProps): JSX.Element => { const router = useRouter(); const iconMap = [HandCoins, LockSimple, CodeBlock, Gauge, Resize, Code, Star, Headset]; const [currency, setCurrency] = useState("€"); @@ -28,6 +33,10 @@ export const CloudObjectStoragePriceCardSection = ({ textContent }: PriceCardSec }) }, []); + const checkoutUrl = couponCode + ? `/cloud-object-storage/checkout?couponCode=${couponCode}` + : '/cloud-object-storage/checkout'; + const getPrice = (currencyValue: string) => { if (currencyValue === 'usd') return 8; return 7; @@ -72,7 +81,7 @@ export const CloudObjectStoragePriceCardSection = ({ textContent }: PriceCardSec
diff --git a/src/pages/cloud-object-storage/free-cloud-object-storage.tsx b/src/pages/cloud-object-storage/free-cloud-object-storage.tsx index b49b15572..1310028e3 100644 --- a/src/pages/cloud-object-storage/free-cloud-object-storage.tsx +++ b/src/pages/cloud-object-storage/free-cloud-object-storage.tsx @@ -13,6 +13,9 @@ import FAQSection from '@/components/shared/sections/FaqSection'; import { GetServerSidePropsContext } from 'next'; import Script from 'next/script'; import { sm_breadcrumb_list, sm_faq } from '@/components/utils/schema-markup-generator'; +import { PromoCodeName } from '@/lib/types'; + +const CHECKOUT_COUPON = PromoCodeName.seolp; interface FreeCloudObjectStorageProps { metatagsDescription: MetatagsDescription[]; @@ -43,9 +46,9 @@ const FreeCloudObjectStorage = ({ - + - + diff --git a/src/pages/cloud-storage-backup-solutions.tsx b/src/pages/cloud-storage-backup-solutions.tsx index 27dd061b6..817cb9cb0 100644 --- a/src/pages/cloud-storage-backup-solutions.tsx +++ b/src/pages/cloud-storage-backup-solutions.tsx @@ -75,7 +75,7 @@ const CloudStorageBackupSolutions = ({ { imageUrl: '/images/cloud-storage-backup-solutions/internxt_s3.webp', animationDirection: 'left', - redirect: '/cloud-object-storage/checkout', + redirect: `/cloud-object-storage/checkout?couponCode=${PromoCodeName.seolp}`, textContent: textContent.WhatWeDo.square2, }, ];