fix(i18n): keep locale on website->dashboard links; dashboard defaults to fa

Marketing-site login/register/dashboard links were locale-less (app.meezi.ir/login), so the dashboard auto-detected locale from the browser Accept-Language (en-US) and redirected Persian users to /en. Links now carry the current locale, and the dashboard sets localeDetection:false so any locale-less entry defaults to fa (Iran-first) instead of guessing from the browser.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
soroush.asadi
2026-06-01 23:23:09 +03:30
parent 4c7783884c
commit 35494d8b32
5 changed files with 11 additions and 6 deletions
+2 -2
View File
@@ -93,7 +93,7 @@ export function Navbar() {
{locale === "fa" ? "EN" : "فا"}
</button>
<a
href="https://app.meezi.ir/login"
href={`https://app.meezi.ir/${locale}/login`}
className="rounded-lg px-3 py-2 text-sm font-medium text-gray-600 transition-colors hover:bg-gray-100 hover:text-gray-900"
>
{t("login")}
@@ -143,7 +143,7 @@ export function Navbar() {
</ul>
<div className="mt-3 flex flex-col gap-2 border-t border-gray-100 pt-3">
<a
href="https://app.meezi.ir/login"
href={`https://app.meezi.ir/${locale}/login`}
className="block rounded-lg px-3 py-2.5 text-center text-sm font-medium text-gray-600 hover:bg-gray-50"
>
{t("login")}
@@ -101,7 +101,7 @@ export function LaunchCountdownSection() {
</div>
<a
href="https://app.meezi.ir/register"
href={`https://app.meezi.ir/${locale}/register`}
className={cn(
"inline-flex items-center justify-center rounded-xl bg-brand-700 px-6 py-3 text-sm font-semibold text-white",
"transition hover:bg-brand-800 focus:outline-none focus-visible:ring-2 focus-visible:ring-brand-700 focus-visible:ring-offset-2"
@@ -34,7 +34,7 @@ export function PricingSection() {
priceNote: t("freePriceNote"),
desc: t("freeDesc"),
cta: t("ctaFree"),
href: "https://app.meezi.ir/register",
href: `https://app.meezi.ir/${locale}/register`,
features: [t("f1"), t("f2"), t("f3"), t("f4"), t("f5")],
popular: false,
variant: "outline",