chore(theme): define palette and typographies and override mui styles with this values, also add rtlProvider
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { useEffect } from 'react';
|
||||
import { useLayoutEffect } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
/**
|
||||
@@ -8,10 +8,10 @@ import { useTranslation } from 'react-i18next';
|
||||
export const LanguageManager = () => {
|
||||
const { i18n } = useTranslation();
|
||||
|
||||
useEffect(() => {
|
||||
useLayoutEffect(() => {
|
||||
const handleLanguageChange = (lng: string) => {
|
||||
document.documentElement.dir = i18n.dir(lng);
|
||||
document.documentElement.lang = lng;
|
||||
document.documentElement.setAttribute('dir', i18n.dir(lng));
|
||||
document.documentElement.setAttribute('lang', lng);
|
||||
};
|
||||
|
||||
// Set initial values on component mount
|
||||
|
||||
Reference in New Issue
Block a user