feat: add more page

This commit is contained in:
ReaJason
2025-08-13 23:53:40 +08:00
parent afa8f9dd06
commit 83fe7cad8c
60 changed files with 2403 additions and 284 deletions
+13 -3
View File
@@ -1,8 +1,10 @@
import { createBrowserRouter } from "react-router-dom";
import RootLayout from "@/components/layouts/root-layout";
import { env } from "@/config";
import IndexPage from "@/pages";
import MemShellPage from "@/pages/memshell";
import { FormSchema } from "@/types/schema";
import { createBrowserRouter } from "react-router-dom";
import DetectionPage from "./pages/detection";
import MemShellPartyLandingPage from "./pages/landing";
// Function to parse URL parameters into form default values
const parseUrlParams = (searchParams: URLSearchParams): Partial<FormSchema> => {
@@ -48,12 +50,20 @@ export const router = createBrowserRouter(
children: [
{
index: true,
element: <IndexPage />,
element: <MemShellPartyLandingPage />,
},
{
path: "memshell",
element: <MemShellPage />,
loader: ({ request }) => {
const url = new URL(request.url);
return parseUrlParams(url.searchParams);
},
},
{
path: "detection",
element: <DetectionPage />,
},
],
},
],