refactor(auth): apply fixed public instance locale resolution to auth pages

This commit is contained in:
poyrazavsever
2026-07-20 10:25:40 +03:00
parent b424385667
commit 7a4f2bf2ea
6 changed files with 11 additions and 34 deletions
+3 -1
View File
@@ -9,6 +9,7 @@ import { Input, Label } from "poyraz-ui/atoms";
import { Alert, AlertDescription } from "poyraz-ui/molecules";
import { getPortalInvitationPreview } from "@/server/auth/invitations";
import { getPublicBranding } from "@/server/branding/runtime";
import { resolveInvitationLocale } from "@/server/i18n/resolver";
import { createTranslator } from "@/server/i18n/translator";
export const dynamic = "force-dynamic";
@@ -28,7 +29,8 @@ export default async function InvitationPage({
notFound();
}
const t = createTranslator(invitation.locale, ["auth"]).t;
const resolvedLocale = await resolveInvitationLocale(invitation.locale);
const t = createTranslator(resolvedLocale.locale, ["auth"]).t;
const query = await searchParams;
const queryCode = query.code ?? null;
const queryMessage = queryCode ? t(queryCode) : query.message;