add root layout

This commit is contained in:
Alex Holliday committed 2025-09-26 16:01:05 -07:00
1 parent b7db3f96ba
commit 1d5f2427ed
3 files changed
+96 -20

No files matched your search

+39
View File
@@ -0,0 +1,39 @@
import { Routes, Route } from "react-router";
import { ThemeProvider } from "@emotion/react";
import { lightTheme, darkTheme } from "@/Utils/Theme/v2/theme";
// v2 pages
import AuthLoginV2 from "@/Pages/v2/Auth/Login";
import AuthRegisterV2 from "@/Pages/v2/Auth/Register";
import RootLayout from "@/Components/v2/Layouts/RootLayout";
// import other v2 pages here...
const V2Routes = ({ mode = "light" }) => {
const v2Theme = mode === "light" ? lightTheme : darkTheme;
return (
<ThemeProvider theme={v2Theme}>
<Routes>
<Route
path="login"
element={<AuthLoginV2 />}
/>
<Route
path="register"
element={<AuthRegisterV2 />}
/>
<Route
path="/"
element={<RootLayout mode={mode} />}
>
<Route
path="test"
element={<h1>Test Page</h1>}
/>
</Route>
</Routes>
</ThemeProvider>
);
};
export default V2Routes;