+1
-1
@@ -97,7 +97,7 @@ export default async function RootLayout({
|
|||||||
<SoundProvider>
|
<SoundProvider>
|
||||||
{children}
|
{children}
|
||||||
<QueryToastBridge />
|
<QueryToastBridge />
|
||||||
<Toaster />
|
<Toaster locale={locale} />
|
||||||
</SoundProvider>
|
</SoundProvider>
|
||||||
</ThemeProvider>
|
</ThemeProvider>
|
||||||
<Script
|
<Script
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { useLocale } from "next-intl";
|
|
||||||
import { Toaster as HotToaster, type ToasterProps } from "react-hot-toast";
|
import { Toaster as HotToaster, type ToasterProps } from "react-hot-toast";
|
||||||
|
|
||||||
export function Toaster(props: ToasterProps) {
|
type AppToasterProps = ToasterProps & {
|
||||||
const locale = useLocale();
|
locale: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
export function Toaster({ locale, ...props }: AppToasterProps) {
|
||||||
const isArabic = locale === "ar";
|
const isArabic = locale === "ar";
|
||||||
|
|
||||||
const toastClassName = `${isArabic ? "font-arabic tracking-normal" : "font-latin"} text-[13px] leading-5`;
|
const toastClassName = `${isArabic ? "font-arabic tracking-normal" : "font-latin"} text-[13px] leading-5`;
|
||||||
|
|||||||
Reference in New Issue
Block a user