From 0ce21299692ea52aa17877f1b826387f630cb238 Mon Sep 17 00:00:00 2001 From: simmmpleweb Date: Wed, 24 Jul 2024 16:34:28 +0300 Subject: [PATCH] RTL --- src/App.tsx | 46 +++++++++++++++++++------------------ src/index.tsx | 3 +-- src/layouts/admin/index.tsx | 6 +---- src/layouts/auth/index.tsx | 6 +---- src/layouts/rtl/index.tsx | 6 +---- 5 files changed, 28 insertions(+), 39 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index f37e1ce..cc940a5 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,36 +1,38 @@ import './assets/css/App.css'; import { Routes, Route, Navigate } from 'react-router-dom'; +import {} from 'react-router-dom'; import AuthLayout from './layouts/auth'; import AdminLayout from './layouts/admin'; import RTLLayout from './layouts/rtl'; -import React from 'react'; -import theme from 'theme/theme'; -import { ChakraProvider } from '@chakra-ui/react'; +import { + ChakraProvider, + // extendTheme +} from '@chakra-ui/react'; import initialTheme from './theme/theme'; // { themeGreen } import { useState } from 'react'; +// Chakra imports export default function Main() { + // eslint-disable-next-line const [currentTheme, setCurrentTheme] = useState(initialTheme); return ( - - - - } /> - - } - /> - - } - /> - } /> - - + + + } /> + + } + /> + + } + /> + } /> + ); } diff --git a/src/index.tsx b/src/index.tsx index b60f977..54dfbf1 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,7 +1,6 @@ -import React from 'react'; +import './assets/css/App.css'; import ReactDOM from 'react-dom/client'; import { BrowserRouter } from 'react-router-dom'; -import './assets/css/App.css'; import App from './App'; diff --git a/src/layouts/admin/index.tsx b/src/layouts/admin/index.tsx index 0247741..4900bdf 100644 --- a/src/layouts/admin/index.tsx +++ b/src/layouts/admin/index.tsx @@ -56,11 +56,7 @@ export default function Dashboard(props: { [x: string]: any }) { return routes.map((route: RoutesType, key: any) => { if (route.layout === '/admin') { return ( - + ); } else { return null; diff --git a/src/layouts/auth/index.tsx b/src/layouts/auth/index.tsx index 20cc8e0..8e1da52 100644 --- a/src/layouts/auth/index.tsx +++ b/src/layouts/auth/index.tsx @@ -19,11 +19,7 @@ export default function Auth() { return routes.map((route: RoutesType, key: any) => { if (route.layout === '/auth') { return ( - + ); } else { return null; diff --git a/src/layouts/rtl/index.tsx b/src/layouts/rtl/index.tsx index 70de23e..c34457c 100644 --- a/src/layouts/rtl/index.tsx +++ b/src/layouts/rtl/index.tsx @@ -57,11 +57,7 @@ export default function Dashboard(props: { [x: string]: any }) { return routes.map((route: RoutesType, key: any) => { if (route.layout === '/rtl') { return ( - + ); } else { return null;