47 lines
1.3 KiB
TypeScript
47 lines
1.3 KiB
TypeScript
import { createBrowserRouter } from "react-router-dom";
|
|
import { AuthLayout } from "../components/ui/auth/layout";
|
|
import App from "../App";
|
|
import { Login } from "../pages/auth/login";
|
|
import { ForgotPassword } from "../pages/auth/forgot-password";
|
|
import { Register } from "../pages/auth/register";
|
|
import { ResetPassword } from "../pages/auth/reset-password";
|
|
import { LoginWithCode } from "../pages/auth/login-with-code";
|
|
import { SendCode } from "../pages/auth/send-code";
|
|
|
|
|
|
export const router = createBrowserRouter([
|
|
{
|
|
path: "/",
|
|
element: <App />
|
|
},
|
|
{
|
|
element: <AuthLayout />,
|
|
path: "/auth",
|
|
children: [
|
|
{
|
|
path: "login",
|
|
element: <Login />
|
|
},
|
|
{
|
|
path: "forgot-password",
|
|
element: <ForgotPassword />
|
|
},
|
|
{
|
|
path: "register",
|
|
element: <Register />
|
|
},
|
|
{
|
|
path: "reset-password",
|
|
element: <ResetPassword />
|
|
},
|
|
{
|
|
path: "login-with-code",
|
|
element: <LoginWithCode />
|
|
},
|
|
{
|
|
path: "send-code",
|
|
element: <SendCode />
|
|
},
|
|
]
|
|
}
|
|
]) |