Merge branch 'develop' into feat/login-signup

This commit is contained in:
SajadMRjl
2025-08-14 08:49:10 +03:30
committed by GitHub
16 changed files with 2654 additions and 805 deletions

View File

@@ -3,6 +3,7 @@ import { I18nextProvider } from 'react-i18next';
import i18n from '@/config/i18n';
import { CustomThemeProvider } from './CustomThemeProvider';
import { RtlProvider } from './RtlProvider';
import { ToastProvider } from '@rkheftan/harmony-ui';
export const AppProviders: React.FC<{ children: React.ReactNode }> = ({
children,
@@ -10,7 +11,9 @@ export const AppProviders: React.FC<{ children: React.ReactNode }> = ({
return (
<I18nextProvider i18n={i18n}>
<RtlProvider>
<CustomThemeProvider>{children}</CustomThemeProvider>
<CustomThemeProvider>
<ToastProvider>{children}</ToastProvider>
</CustomThemeProvider>
</RtlProvider>
</I18nextProvider>
);

View File

@@ -3,6 +3,7 @@ import { useTranslation } from 'react-i18next';
import { CacheProvider } from '@emotion/react';
import createCache from '@emotion/cache';
import rtlPlugin from 'stylis-plugin-rtl';
import { prefixer } from 'stylis';
// This provider configures Emotion's cache to support RTL.
export const RtlProvider: React.FC<{ children: React.ReactNode }> = ({
@@ -14,7 +15,7 @@ export const RtlProvider: React.FC<{ children: React.ReactNode }> = ({
const isRtl = i18n.dir(i18n.language) === 'rtl';
return createCache({
key: isRtl ? 'muirtl' : 'muiltr',
stylisPlugins: isRtl ? [rtlPlugin] : [],
stylisPlugins: isRtl ? [prefixer, rtlPlugin] : [],
});
}, [i18n]);