refactor(auth): apply fixed public instance locale resolution to auth pages
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
import { AuthPageShell } from "@/components/auth/auth-page-shell";
|
||||
import { LocaleSelectForm } from "@/components/i18n/locale-select-form";
|
||||
import { getPublicBranding } from "@/server/branding/runtime";
|
||||
import { getSqliteConnection } from "@/server/db/client";
|
||||
import { ContentTranslationService } from "@/server/i18n/content";
|
||||
import { resolveRequestLocale } from "@/server/i18n/resolver";
|
||||
import { resolvePublicLocale } from "@/server/i18n/resolver";
|
||||
import { createTranslator } from "@/server/i18n/translator";
|
||||
import Link from "next/link";
|
||||
import { Alert, AlertDescription } from "poyraz-ui/molecules";
|
||||
@@ -12,9 +9,8 @@ export const dynamic = "force-dynamic";
|
||||
|
||||
export default async function ForgotPasswordPage() {
|
||||
const branding = getPublicBranding();
|
||||
const locale = await resolveRequestLocale();
|
||||
const locale = await resolvePublicLocale();
|
||||
const t = createTranslator(locale.locale, ["auth"]).t;
|
||||
const localization = new ContentTranslationService(getSqliteConnection().db).getPublicLocalizationContext();
|
||||
|
||||
return (
|
||||
<AuthPageShell
|
||||
@@ -41,7 +37,6 @@ export default async function ForgotPasswordPage() {
|
||||
}}
|
||||
form={
|
||||
<div className="space-y-6">
|
||||
<LocaleSelectForm label={t("auth.language")} value={locale.locale} locales={localization.locales} />
|
||||
<Alert variant="info" appearance="soft">
|
||||
<AlertDescription>{t("auth.forgot.helper")}</AlertDescription>
|
||||
</Alert>
|
||||
|
||||
Reference in New Issue
Block a user