From 0aab21db19401870ddb217bd63a97107e548a374 Mon Sep 17 00:00:00 2001 From: expdsn <18111002318@163.com> Date: Thu, 23 Jan 2025 11:31:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E7=83=AD=E9=97=A8=E7=AE=A1?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/_lib/atom.ts | 5 ++ app/_ui/LinkListBox.tsx | 6 +- app/_ui/Search.tsx | 2 +- app/_ui/SiderNav.tsx | 12 ++- .../(default)/dashboard/EditIconContent.tsx | 79 ------------------- app/admin/(default)/dashboard/LinkTable.tsx | 63 ++++++++++++--- app/admin/(default)/dashboard/page.tsx | 2 + app/api/link/[id]/route.ts | 44 +++++++++++ app/api/link/route.ts | 20 +---- app/api/linkType/route.ts | 1 + package.json | 2 + pnpm-lock.yaml | 49 ++++++++++++ 12 files changed, 172 insertions(+), 113 deletions(-) create mode 100644 app/_lib/atom.ts delete mode 100644 app/admin/(default)/dashboard/EditIconContent.tsx create mode 100644 app/api/link/[id]/route.ts diff --git a/app/_lib/atom.ts b/app/_lib/atom.ts new file mode 100644 index 0000000..31280f1 --- /dev/null +++ b/app/_lib/atom.ts @@ -0,0 +1,5 @@ +import { atom } from 'jotai'; + +// 定义一个简单的原子 +export const linkTypeAtom = atom(''); + diff --git a/app/_ui/LinkListBox.tsx b/app/_ui/LinkListBox.tsx index 99860d9..40a4319 100644 --- a/app/_ui/LinkListBox.tsx +++ b/app/_ui/LinkListBox.tsx @@ -4,7 +4,7 @@ import { Link as _Link } from "../api/link/route"; import { LinkType } from "../api/linkType/route"; export default function LinkListBox({ linkTypeList, linkList }: { linkTypeList: LinkType[]; linkList: _Link[] }) { - return