Fix dynamic locale fallback resolution
CI / quality (push) Waiting to run

This commit is contained in:
MOH
2026-03-15 05:27:19 +01:00
parent 27df4ad2fe
commit 060d48f9c4
3 changed files with 8 additions and 10 deletions
+2 -5
View File
@@ -1,13 +1,10 @@
"use client";
import { usePathname } from "next/navigation";
import { useLocale } from "next-intl";
import { Toaster as HotToaster, type ToasterProps } from "react-hot-toast";
import { resolveLocale } from "@/lib/locale";
export function Toaster(props: ToasterProps) {
const pathname = usePathname();
const locale = resolveLocale(pathname.split("/")[1] || "de");
const locale = useLocale();
const isArabic = locale === "ar";
const toastClassName = `${isArabic ? "font-arabic tracking-normal" : "font-latin"} text-[13px] leading-5`;