Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 3 additions & 1 deletion src/hooks/useSpecialOfferConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ export const ALLOWED_PATHS = [
'tukaram',
'f4mi',
'macho',
'heise'
'heise',
'world-backup-day'
];
export const ALTERNATE_RECOMENDATED_PLAN_PATHS = new Set<string>([]);
export const DARK_MODE_PATHS = new Set<string>(['baity', 'oscar', 'rimembah', 'believemy', 'ghareeb']);
Expand Down Expand Up @@ -103,6 +104,7 @@ export const COUPON_CODES = {
f4mi: PromoCodeName.f4mi,
macho: PromoCodeName.macho,
heise: PromoCodeName.heise,
'world-backup-day': PromoCodeName.worldBackupDay,
};

interface OfferConfig {
Expand Down
3 changes: 2 additions & 1 deletion src/lib/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,8 @@ export enum PromoCodeName {
tukaram = 'TUKARAM',
f4mi = 'F4MI',
macho = 'MACHO',
heise = 'HEISE'
heise = 'HEISE',
worldBackupDay = 'WORLDBACKUPDAY',
}

export interface PromoCodeProps {
Expand Down
13 changes: 9 additions & 4 deletions src/pages/[filename].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ function CombinedSpecialOffer({

const {
products,
loadingCards,
currency,
currencyValue,
coupon: individualCoupon,
Expand Down Expand Up @@ -181,7 +180,13 @@ function CombinedSpecialOffer({
};

return (
<Layout title={metatags!.title} description={metatags!.description} segmentName="Partners" lang={lang}>
<Layout
title={metatags!.title}
description={metatags!.description}
segmentName="Partners"
lang={lang}
robots={pathname === 'world-backup-day' ? 'noindex,follow' : undefined}
>
<Navbar lang={lang} textContent={navbarLang} cta={['payment']} isLinksHidden hideCTA hideLogoLink />

<HeroSection
Expand Down Expand Up @@ -221,7 +226,7 @@ function CombinedSpecialOffer({
lifetimeCoupons={lifetimeCoupons}
lang={lang}
products={products}
loadingCards={loadingCards}
loadingCards={false}
onCheckoutButtonClicked={onCheckoutButtonClicked}
hideBusinessCards
hideBusinessSelector
Expand Down Expand Up @@ -292,7 +297,7 @@ function CombinedSpecialOffer({

export async function getServerSideProps(ctx) {
const pathname = ctx.params.filename;
const lang = LANG_MAP[pathname] || 'es';
const lang = pathname === 'world-backup-day' && ctx.locale ? ctx.locale : (LANG_MAP[pathname] || 'es');

const metatagsDescriptions = require(`@/assets/lang/${lang}/metatags-descriptions.json`);
const navbarLang = require(`@/assets/lang/${lang}/navbar.json`);
Expand Down
Loading