feat: add router config, layout, header, and toolbar

This commit is contained in:
SajadMRjl
2025-08-11 17:29:41 +03:30
parent 848ca4dd62
commit 85c16acb74
11 changed files with 1036 additions and 699 deletions

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 }> = ({
@@ -15,8 +16,8 @@ export const RtlProvider: React.FC<{ children: React.ReactNode }> = ({
const newDir = i18n.dir(i18n.language);
const newCache = createCache({
key: 'css',
stylisPlugins: newDir === 'rtl' ? [rtlPlugin] : [],
key: 'mui',
stylisPlugins: newDir === 'rtl' ? [prefixer, rtlPlugin] : [],
});
setCache(newCache);
}, [i18n, i18n.language]);