Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/assets/lang/en/specialOfferTemplate.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"description": "Secure cloud storage for less. Claim your special discount today. Access Internxt's award-winning privacy suite with post-quantum encrypted cloud storage and much more.",
"subtitle": "Get {{discount}}% off ",
"subtitle2": "on all plans",
"lifetimeSubtitle2": "on all lifetime plans",
"claimDeal": "Claim deal"
},
"ReviewSection": {
Expand Down
4 changes: 3 additions & 1 deletion src/components/partnersTemplate/HeroSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ interface HeroSectionForPartnerProps {
isClubic?: boolean;
isPcMag?: boolean;
isUltimatePlan?: boolean;
specialOffer?: boolean;
}

export default function HeroSection({
Expand All @@ -37,6 +38,7 @@ export default function HeroSection({
isClubic = false,
isUltimatePlan = false,
isPcMag = false,
specialOffer = false,
}: Readonly<HeroSectionForPartnerProps>): JSX.Element {
const [currency, setCurrency] = useState<string>('€');

Expand Down Expand Up @@ -166,7 +168,7 @@ export default function HeroSection({
<p className={darkMode ? 'bg-purple-100 text-purple-8' : 'bg-neutral-37 text-primary '}>
{parsePercentText(textContent.subtitle)}
</p>
<p>{textContent.subtitle2} </p>
{specialOffer ? <p>{textContent.subtitle2} </p> : <p>{textContent.lifetimeSubtitle2}</p>}
</span>
)}
<p
Expand Down
7 changes: 3 additions & 4 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,9 @@ const HomePage = ({ metatagsDescriptions, textContent, lang, navbarLang, footerL
const decimalDiscountForLifetime = lifetimeCoupon?.percentOff && 100 - lifetimeCoupon.percentOff;
const decimalDiscount = individualCoupon?.percentOff && 100 - individualCoupon.percentOff;
const percentOff = lifetimeCoupon?.percentOff !== undefined ? String(lifetimeCoupon.percentOff) : '0';
const minimumPrice =
decimalDiscount !== undefined
? (10 * (decimalDiscount / 100)).toFixed(2)
: products?.individuals[Interval.Year][0].price.toString() || '9.99';
const minimumPrice = decimalDiscount
? (Math.floor(9.99 * (decimalDiscount / 100) * 100) / 100).toFixed(2)
: products?.individuals[Interval.Year][0].price.toString() || '9.99';

return (
<Layout title={metatags[0].title} description={metatags[0].description} segmentName="Home" lang={lang}>
Expand Down
7 changes: 6 additions & 1 deletion src/pages/specialoffer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,12 @@ function SpecialOffer({
)}
<Navbar lang={lang} textContent={navbarLang} cta={['payment']} isLinksHidden hideCTA />

<HeroSection textContent={langJson.HeroSection} percentOff={percentOff} image={'internxt-private-cloud'} />
<HeroSection
textContent={langJson.HeroSection}
percentOff={percentOff}
image={'internxt-private-cloud'}
specialOffer
/>

<ReviewsSection textContent={langJson.ReviewSection} />

Expand Down
Loading