switch to react location for routing
This commit is contained in:
21
packages/docs-new/src/routes.tsx
Normal file
21
packages/docs-new/src/routes.tsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import type { Route } from "react-location"
|
||||
|
||||
export const routes: Route[] = [
|
||||
{
|
||||
path: "/",
|
||||
element: () =>
|
||||
import("./pages/landing-page").then((m) => <m.LandingPage />),
|
||||
},
|
||||
{
|
||||
path: "docs",
|
||||
element: () =>
|
||||
import("./pages/document-page").then((m) => <m.DocumentPage />),
|
||||
children: [
|
||||
{
|
||||
path: "*",
|
||||
element: ({ params }) =>
|
||||
import(`./docs/${params["*"]}.md`).then((m) => <m.default />),
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
Reference in New Issue
Block a user