diff --git a/src/layouts/Landing.astro b/src/layouts/Landing.astro index d316ce3..7d01571 100644 --- a/src/layouts/Landing.astro +++ b/src/layouts/Landing.astro @@ -62,6 +62,11 @@ const daysLeft = Math.max(0, Math.ceil((deadline.getTime() - now.getTime()) / (1 const ctaPath = locale === 'en' ? '/cta/' : `/${locale}/cta/`; const homePath = locale === 'en' ? '/' : `/${locale}/`; + +/** Rewrite /cta/#consumers to the active locale CTA path. */ +function localizeCtaLinks(html: string): string { + return html.replace(/href="\/cta\/#consumers"/g, `href="${ctaPath}#consumers"`); +} --- {/* Head slot: pages can inject scripts (e.g. the redirect script) */} @@ -174,7 +179,7 @@ const homePath = locale === 'en' ? '/' : `/${locale}/`;