Fix toaster locale crash
CI / quality (push) Waiting to run

This commit is contained in:
MOH
2026-03-15 05:29:44 +01:00
parent 060d48f9c4
commit 9b8409a7d3
2 changed files with 6 additions and 4 deletions
+5 -3
View File
@@ -1,10 +1,12 @@
"use client";
import { useLocale } from "next-intl";
import { Toaster as HotToaster, type ToasterProps } from "react-hot-toast";
export function Toaster(props: ToasterProps) {
const locale = useLocale();
type AppToasterProps = ToasterProps & {
locale: string;
};
export function Toaster({ locale, ...props }: AppToasterProps) {
const isArabic = locale === "ar";
const toastClassName = `${isArabic ? "font-arabic tracking-normal" : "font-latin"} text-[13px] leading-5`;