refactor: use react router

This commit is contained in:
ReaJason
2025-04-06 13:55:17 +08:00
parent 47ea535fac
commit 85e9eb8c70
12 changed files with 151 additions and 212 deletions
+22
View File
@@ -0,0 +1,22 @@
import { createBrowserRouter } from "react-router-dom";
import { env } from "@/config";
import RootLayout from "@/components/layouts/root-layout";
import IndexPage from "@/pages";
export const router = createBrowserRouter(
[
{
path: "/",
element: <RootLayout />,
children: [
{
index: true,
element: <IndexPage />,
},
],
},
],
{
basename: env.BASE_PATH,
}
);