From 359f51112ce7a16cc60f0e0ec38b5393674fa432 Mon Sep 17 00:00:00 2001 From: yimang Date: Sun, 26 Apr 2026 17:42:17 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20Updated=20the=20=E2=80=9CContact=20your?= =?UTF-8?q?=20regulators.=E2=80=9D=20link=20to=20use=20the=20current=20loc?= =?UTF-8?q?ale=E2=80=99s=20CTA=20path?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layouts/Landing.astro | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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}/`;