diff --git a/src/components/sidebar/index.tsx b/src/components/sidebar/index.tsx
new file mode 100644
index 0000000..a1c2680
--- /dev/null
+++ b/src/components/sidebar/index.tsx
@@ -0,0 +1,25 @@
+import { Sidebar, SidebarContent, SidebarFooter, SidebarHeader, SidebarMenuButton, SidebarMenuItem } from "@/components/ui/sidebar";
+import { tools } from "@/components/tool";
+
+export const AppSidebar = () => (
+
+
+ Lite Kit
+
+
+ {
+ tools.map((tool) => (
+
+
+ {tool.icon}
+ {tool.name}
+
+
+ ))
+ }
+
+
+ contact us
+
+
+)
\ No newline at end of file
diff --git a/src/components/tool/index.tsx b/src/components/tool/index.tsx
new file mode 100644
index 0000000..1ffec6c
--- /dev/null
+++ b/src/components/tool/index.tsx
@@ -0,0 +1,8 @@
+interface Tool {
+ name: string;
+ description: string;
+ icon: React.ReactNode;
+ component: React.ReactNode;
+}
+
+export const tools: Tool[] = [];
\ No newline at end of file
diff --git a/src/router.tsx b/src/router.tsx
index 0e17d98..72d384c 100644
--- a/src/router.tsx
+++ b/src/router.tsx
@@ -5,6 +5,7 @@ import {
} from "react-router-dom";
import { Layout } from "./layout";
+import { tools } from "@/components/tool";
// 路由配置
const router = createBrowserRouter([
@@ -15,18 +16,20 @@ const router = createBrowserRouter([
{
path: "tools",
children: [
+ ...tools.map((tool) => (
+ {
+ path: tool.name,
+ element: tool.component,
+ }
+ )),
{
index: true,
- loader: () => redirect(`/empty`),
+ element: null,
},
]
},
]
},
- {
- path: "empty",
- element:
Nohting
,
- },
{
index: true,
loader: () => {