better-auth/apps/web/modules/i18n/lib/update-locale.ts
 Илья Шалонин 8538ab969a first
2025-10-29 13:43:43 +05:00

10 lines
271 B
TypeScript

"use server";
import { setLocaleCookie } from "@i18n/lib/locale-cookie";
import type { Locale } from "@repo/i18n";
import { revalidatePath } from "next/cache";
export async function updateLocale(locale: Locale) {
await setLocaleCookie(locale);
revalidatePath("/");
}