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
10 changes: 5 additions & 5 deletions src/components/CybersecurityQuiz/QuizSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ const View = (viewSelected: ViewProps | undefined) => {
<p className="text-center text-lg xl:text-left">{textContent.QuizSection.quizCompleted.description}</p>
<ul className="flex list-[square] flex-col space-y-1.5 pl-6">
<li className="cursor-pointer text-lg font-bold hover:underline">
<Link href="/cyber-awareness" target="_blank">
<Link href="/cyber-awareness">
{textContent.QuizSection.quizCompleted.cyberAwareness}
</Link>
</li>
Expand All @@ -201,22 +201,22 @@ const View = (viewSelected: ViewProps | undefined) => {
</button>
</li>
<li className="cursor-pointer text-lg font-bold hover:underline">
<Link href={'/what-does-google-know-about-me'} target="_blank">
<Link href={'/what-does-google-know-about-me'}>
{textContent.QuizSection.quizCompleted.whatGoogleKnows}
</Link>
</li>
<li className="cursor-pointer text-lg font-bold hover:underline">
<Link href={'/password-generator'} target="_blank">
<Link href={'/password-generator'}>
{textContent.QuizSection.quizCompleted.passwordGenerator}
</Link>
</li>
<li className="cursor-pointer text-lg font-bold hover:underline">
<Link href={'/virus-scanner'} target="_blank">
<Link href={'/virus-scanner'}>
{textContent.QuizSection.quizCompleted.freeVirusScanner}
</Link>
</li>
<li className="cursor-pointer text-lg font-bold hover:underline">
<Link href={'/password-checker'} target="_blank">
<Link href={'/password-checker'}>
{textContent.QuizSection.quizCompleted.passwordChecker}
</Link>
</li>
Expand Down
2 changes: 1 addition & 1 deletion src/components/auth/SignUp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export default function SignUp(props: Readonly<SignUpProps>) {

<span className="text-center text-sm text-gray-50">
<span>{props.textContent.SignUp.disclaimer.text}</span>{' '}
<a href="/legal" target="_blank" className="hover:text-gray-60 hover:underline active:text-gray-80">
<a href="/legal" className="hover:text-gray-60 hover:underline active:text-gray-80">
{props.textContent.SignUp.disclaimer.link}
</a>
{'.'}
Expand Down
2 changes: 1 addition & 1 deletion src/components/auth/SignUpInline.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export default function SignUpInline(props: Readonly<SignUpInlineProps>) {
</div>
<span className={`w-full text-sm ${props.darkMode ? 'text-white' : 'text-gray-50'} sm:text-left`}>
<span>{props.textContent.disclaimer.text}</span>{' '}
<a href="/legal" target="_blank" className="underline hover:text-gray-60 active:text-gray-80">
<a href="/legal" className="underline hover:text-gray-60 active:text-gray-80">
{props.textContent.disclaimer.link}
</a>
<span>{'.'}</span>
Expand Down
2 changes: 1 addition & 1 deletion src/components/converter-tool/ConversionTableSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ const ConversionTableSection = ({ textContent, lang }) => {
</div>
</div>
<div className="flex cursor-pointer">
<Link href="/password-checker" target="_blank" className="mx-5 flex max-w-4xl cursor-pointer flex-row">
<Link href="/password-checker" className="mx-5 flex max-w-4xl cursor-pointer flex-row">
<Image
src={`/images/converter-tool/PasswordChecker${langUpperCase}.webp`}
width={897}
Expand Down
2 changes: 1 addition & 1 deletion src/components/converter-tool/ExplanationSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const ExplanationSection = ({ textContent, bannerText, lang }) => {
<p className="text-lg font-normal text-gray-80">{textContent.MBMeaning.description}</p>
</div>
<div className="flex cursor-pointer">
<Link href={'/virus-scanner'} target="_blank" className="flex max-w-4xl cursor-pointer flex-row">
<Link href={'/virus-scanner'} className="flex max-w-4xl cursor-pointer flex-row">
<Image
src={`/images/converter-tool/VirusScanner${langUpperCase}.webp`}
width={897}
Expand Down
1 change: 0 additions & 1 deletion src/components/cyber-awareness/CtaSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ const CtaSection = ({ textContent }) => {
</div>
<a
href="/pricing"
target={'_blank'}
className="flex rounded-lg bg-white px-5 py-3 text-lg font-medium text-primary hover:bg-blue-10"
>
{textContent.cta}
Expand Down
2 changes: 1 addition & 1 deletion src/components/cyber-awareness/QuizSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const QuizSection = ({ textContent }) => {
<RenderDescription description={textContent.description} />
</div>

<Link href={'/cyber-security-quiz'} target="_blank" className="hidden cursor-pointer lg:flex">
<Link href={'/cyber-security-quiz'} className="hidden cursor-pointer lg:flex">
<Image
src={'/images/cyber-awareness/Internxt_CTA_Blog_CyberSecurityQuiz_EN-1.png'}
width={897}
Expand Down
20 changes: 10 additions & 10 deletions src/components/layout/footers/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,8 @@ export default function Footer({

<Link
href="/antivirus"
target="_blank"
rel="noreferrer"
locale={lang}
passHref
className="items-center hover:text-primary"
>
{textContent.FooterSection.sections.products.antivirus}
Expand Down Expand Up @@ -280,8 +280,8 @@ export default function Footer({

<Link
href="/cloud-object-storage"
target="_blank"
rel="noreferrer"
locale={lang}
passHref
className="flex flex-row items-center hover:text-primary"
>
<div className="flex flex-row">{textContent.FooterSection.sections.products.objStorage}</div>
Expand Down Expand Up @@ -388,7 +388,7 @@ export default function Footer({
{textContent.FooterSection.sections.join.github}
</Link>

<Link href="/affiliates" target="_blank" className="hover:text-primary">
<Link href="/affiliates" locale={lang} passHref className="hover:text-primary">
{textContent.FooterSection.sections.join.affiliates}
</Link>

Expand Down Expand Up @@ -928,8 +928,8 @@ export default function Footer({

<Link
href="/antivirus"
target="_blank"
rel="noreferrer"
locale={lang}
passHref
className="flex flex-row items-center hover:text-primary"
>
<div className="flex flex-row">{textContent.FooterSection.sections.products.antivirus}</div>
Expand Down Expand Up @@ -964,8 +964,8 @@ export default function Footer({

<Link
href="/cloud-object-storage"
target="_blank"
rel="noreferrer"
locale={lang}
passHref
className="flex flex-row items-center hover:text-primary"
>
{textContent.FooterSection.sections.products.objStorage}
Expand Down Expand Up @@ -1096,7 +1096,7 @@ export default function Footer({
{textContent.FooterSection.sections.join.github}
</Link>

<Link href="/affiliates" target="_blank" className="hover:text-primary">
<Link href="/affiliates" locale={lang} passHref className="hover:text-primary">
{textContent.FooterSection.sections.join.affiliates}
</Link>

Expand Down
1 change: 0 additions & 1 deletion src/components/lifetime/FeatureSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ const FeatureSection = ({
className="flex cursor-pointer flex-row items-center justify-center space-x-1 text-lg font-semibold text-primary hover:underline"
href="/about"
locale={router.locale}
target="_blank"
>
{textContent.cta ? (
<>
Expand Down
2 changes: 1 addition & 1 deletion src/components/monitor/PwnedSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const PwnedSection: React.FC<PwnedSectionProps> = ({ textContent, pwnedEl
</p>
<div className="font-regular flex w-full flex-wrap justify-center px-5 text-center text-xl text-gray-80">
<p className="ml-2 mr-2">{textContent.breachesSection.linkToPasswordGenerator.previousText}</p>
<Link href="/password-generator" target="_blank" className="underline hover:text-gray-100 hover:underline">
<Link href="/password-generator" className="underline hover:text-gray-100 hover:underline">
{textContent.breachesSection.linkToPasswordGenerator.linkText}
</Link>
<p className="ml-2">{textContent.breachesSection.linkToPasswordGenerator.otherText}</p>
Expand Down
2 changes: 1 addition & 1 deletion src/components/privacy-directory/HeroSection2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const HeroSection2 = ({ textContent, lang, bannerText }) => {
</div>
<a
href="/privacy"
target={'_blank'}

className="flex cursor-pointer flex-row items-center justify-center space-x-1"
>
<p className="text-lg font-semibold text-primary">{textContent.cta}</p>
Expand Down
1 change: 0 additions & 1 deletion src/components/shared/ProductCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ const ProductCard = ({
<Link
className="flex w-max items-center rounded-lg bg-primary px-5 py-3 font-medium text-white"
href={redirect}
target="_blank"
>
{textContent.cta}
</Link>
Expand Down
2 changes: 1 addition & 1 deletion src/components/shared/RedirectButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ interface RedirectButtonProps {
export const RedirectButton = ({
url,
className,
target = '_blank',
target,
rel,
children,
}: RedirectButtonProps): JSX.Element => (
Expand Down
14 changes: 10 additions & 4 deletions src/components/shared/pricing/PriceCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,15 @@
const priceNumber = hasDiscount ? (Number(price) * decimalDiscountValue) / 100 : Number(price);
const showCents = priceNumber < 1 || isAnnual;

const currentPrice = showCents
? (Math.floor(priceNumber) + 0.98).toFixed(2)
: Math.floor(priceNumber).toString();
const roundIfNeeded = (n: number): string => {
const truncated = (Math.floor(n * 100) / 100).toFixed(2);
if (truncated.endsWith('.98')) return truncated.slice(0, -1) + '9';
if (truncated.endsWith('.00')) return (parseFloat(truncated) - 0.01).toFixed(2);

Check warning on line 140 in src/components/shared/pricing/PriceCard.tsx

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Prefer `Number.parseFloat` over `parseFloat`.

See more on https://sonarcloud.io/project/issues?id=internxt_website&issues=AZ5zJQQn2eiSZ7kyOIEK&open=AZ5zJQQn2eiSZ7kyOIEK&pullRequest=1924
return truncated;
};

const currentPrice = showCents ? roundIfNeeded(priceNumber) : Math.floor(priceNumber).toString();

const getOriginalPrice = () => {
if (hasDiscount === false) {
return undefined;
Expand All @@ -145,7 +151,7 @@
const originalDisplayedPrice = Number(price);

if (showCents) {
return (Math.floor(originalDisplayedPrice) + 0.98).toFixed(2);
return roundIfNeeded(originalDisplayedPrice);
}

return Math.floor(originalDisplayedPrice).toString();
Expand Down
2 changes: 2 additions & 0 deletions src/hooks/useSpecialOfferConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ export const ANNUAL_DISCOUNT_PLANS_PATHS = new Set<string>([
'privacytutor',
'heisect',
'xataka',
'grabon',
'heise',
]);

export const COUPON_CODES = {
Expand Down
8 changes: 4 additions & 4 deletions src/pages/what-does-google-know-about-me.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import Script from 'next/script';



const URL_REDIRECT = 'https://internxt.com/pricing';
const URL_REDIRECT = '/pricing';

const WhatDoesGoogleKnowAboutMe = ({
lang,
Expand Down Expand Up @@ -44,7 +44,7 @@ const WhatDoesGoogleKnowAboutMe = ({
<HeroSection textContent={langJson.HeroSection} bannerText={bannerLang.GoogleLPBanner} lang={lang} />

<RevealY className="content flex h-full w-full flex-col items-center justify-center px-5">
<Link href={URL_REDIRECT} passHref target="_blank">
<Link href={URL_REDIRECT} passHref>
<Image
src={getImage('/banners/PlansBanner.webp')}
alt="Internxt plans banner"
Expand All @@ -60,13 +60,13 @@ const WhatDoesGoogleKnowAboutMe = ({

<WhatGoogleKnowsSection textContent={langJson.WhatGoogleKnowsSection} />

<CtaSection textContent={langJson.CtaSection1} url={URL_REDIRECT} target="_blank" />
<CtaSection textContent={langJson.CtaSection1} url={URL_REDIRECT} />

<ManageGoogleDataSection textContent={langJson.ManageGoogleDataSection} />

<ToolsSection textContent={toolsContent} lang={lang} />

<CtaSection textContent={langJson.CtaSection2} url={URL_REDIRECT} target="_blank" />
<CtaSection textContent={langJson.CtaSection2} url={URL_REDIRECT} />

<Footer textContent={footerLang} lang={lang} breadcrumbItems={[{ name: 'Encrypted Cloud Storage', url: '/' }, { name: 'What does Google know about me', url: '/what-does-google-know-about-me' }]} />
</Layout>
Expand Down
Loading