diff --git a/client/src/App.tsx b/client/src/App.tsx
index a8a25669e..cbf8ecb3d 100644
--- a/client/src/App.tsx
+++ b/client/src/App.tsx
@@ -3,26 +3,23 @@ import { useSelector } from "react-redux";
import "react-toastify/dist/ReactToastify.css";
import { ToastContainer } from "react-toastify";
import { ThemeProvider } from "@emotion/react";
-import lightTheme from "./Utils/Theme/lightTheme";
-import darkTheme from "./Utils/Theme/darkTheme";
import { CssBaseline, GlobalStyles } from "@mui/material";
import { Routes } from "./Routes";
import AppLayout from "@/Components/v2/layout/AppLayout";
import type { RootState } from "@/Types/state";
+import { lightTheme, darkTheme } from "@/Utils/Theme/v2Theme";
function App() {
const mode = useSelector((state: RootState) => state.ui.mode);
-
- const theme = mode === "light" ? lightTheme : darkTheme;
+ const v2theme = mode === "light" ? lightTheme : darkTheme;
return (
-
+
diff --git a/client/src/Components/v2/layout/AppLayout.tsx b/client/src/Components/v2/layout/AppLayout.tsx
index 7c9c3c903..437e73260 100644
--- a/client/src/Components/v2/layout/AppLayout.tsx
+++ b/client/src/Components/v2/layout/AppLayout.tsx
@@ -1,10 +1,9 @@
import Box from "@mui/material/Box";
import { useState, useEffect, useRef } from "react";
-import { ThemeProvider, useTheme } from "@mui/material/styles";
+import { useTheme } from "@mui/material/styles";
import { useSelector } from "react-redux";
import BackgroundSVG from "@/assets/Images/background.svg";
import type { RootState } from "@/Types/state";
-import { lightTheme, darkTheme } from "@/Utils/Theme/v2Theme";
import { OfflineBanner } from "@/Components/v2/design-elements";
import { setServerUnreachableCallback, get } from "@/Utils/ApiClient";
@@ -15,8 +14,6 @@ interface AppLayoutProps {
const AppLayout = ({ children }: AppLayoutProps) => {
const theme = useTheme();
const mode = useSelector((state: RootState) => state.ui.mode);
- const v2theme = mode === "dark" ? darkTheme : lightTheme;
-
const [serverUnreachable, setServerUnreachable] = useState(false);
const retryIntervalRef = useRef(null);
@@ -49,8 +46,7 @@ const AppLayout = ({ children }: AppLayoutProps) => {
{
color: theme.palette.primary.contrastText,
}}
>
-
-
-
+
{children}
);
diff --git a/client/src/Components/v2/layout/RootLayout.tsx b/client/src/Components/v2/layout/RootLayout.tsx
index 0b6defb91..117c08255 100644
--- a/client/src/Components/v2/layout/RootLayout.tsx
+++ b/client/src/Components/v2/layout/RootLayout.tsx
@@ -4,23 +4,16 @@ import Stack from "@mui/material/Stack";
import { useMediaQuery } from "@mui/material";
import { useSidebar } from "@/Hooks/useSidebar";
-import { useSelector } from "react-redux";
-import type { RootState } from "@/Types/state";
-import { lightTheme, darkTheme } from "@/Utils/Theme/v2Theme";
-import { ThemeProvider, useTheme } from "@mui/material";
+import { useTheme } from "@mui/material";
const RootLayout = () => {
- const mode = useSelector((state: RootState) => state.ui.mode);
- const v2theme = mode === "dark" ? darkTheme : lightTheme;
const theme = useTheme();
const isSmall = useMediaQuery(theme.breakpoints.down("md"));
const { collapsedWidth } = useSidebar();
return (
-
-
-
+
{
- const mode = useSelector((state: RootState) => state.ui.mode);
- const v2theme = mode === "light" ? lightTheme : darkTheme;
return (
{
/>
-
-
-
- >
- }
+ element={}
/>
-
-
-
- >
- }
+ element={}
/>
-
-
-
- >
- }
+ element={}
/>
-
-
-
- >
- }
+ element={}
/>
-
-
-
- >
- }
+ element={}
/>
-
-
-
- >
- }
+ element={}
/>
-
-
-
- >
- }
+ element={}
/>
-
-
-
- >
- }
+ element={}
/>
-
-
-
- >
- }
+ element={}
/>
-
-
-
- >
- }
+ element={}
/>
-
-
-
- >
- }
+ element={}
/>
-
-
-
- >
- }
+ element={}
/>
-
-
-
- >
- }
+ element={}
/>
-
-
-
- >
- }
+ element={}
/>
-
-
-
- >
- }
+ element={}
/>
-
-
-
- >
- }
+ element={}
/>
-
-
-
- >
- }
+ element={}
/>
-
-
-
- >
- }
+ element={}
/>
-
-
-
- >
- }
+ element={}
/>
-
-
-
- >
- }
+ element={}
/>
-
-
-
- >
- }
+ element={}
/>
-
-
-
- >
- }
+ element={}
/>
-
-
-
- >
- }
+ element={}
/>
-
-
-
- >
- }
+ element={}
/>
-
-
- }
+ element={}
/>
-
-
- }
+ element={}
/>
-
-
- }
+ element={}
/>
-
-
-
+
}
/>
@@ -367,9 +201,7 @@ const Routes = () => {
path="logs"
element={
-
-
-
+
}
/>
@@ -379,75 +211,37 @@ const Routes = () => {
path="/login"
element={
<>
-
-
-
+
>
}
/>
-
-
-
- >
- }
+ element={}
/>
-
-
-
- >
- }
+ element={}
/>
-
-
-
- >
- }
+ element={}
/>
-
-
-
- >
- }
+ element={}
/>
-
-
-
- >
- }
+ element={}
/>
-
-
-
- >
- }
+ element={}
/>
);