diff --git a/src/app/AppLayout/AppLayout.tsx b/src/app/AppLayout/AppLayout.tsx index 4c49349b..b91afc7a 100644 --- a/src/app/AppLayout/AppLayout.tsx +++ b/src/app/AppLayout/AppLayout.tsx @@ -36,7 +36,6 @@ interface IAppLayout { const AppLayout: React.FunctionComponent = ({ children }) => { const [sidebarOpen, setSidebarOpen] = React.useState(true); const [isDarkTheme, setIsDarkTheme] = React.useState(false); - const [isRTL, setIsRTL] = React.useState(false); const toggleDarkTheme = (_evt, selected) => { const darkThemeToggleClicked = !selected === isDarkTheme; @@ -44,8 +43,14 @@ const AppLayout: React.FunctionComponent = ({ children }) => { setIsDarkTheme(darkThemeToggleClicked); }; + const toggleRTL = () => { + const html = document.querySelector('html'); + const curDir = html.dir; + html.dir = curDir !== 'rtl' ? 'rtl' : 'ltr'; + }; + const Header = ( - +