From 4bb8d35b2a17ca1c1b81901491a6a3bd0a2d065e Mon Sep 17 00:00:00 2001 From: Eamon-meng <17516219072@163.com> Date: Mon, 15 Dec 2025 14:33:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=8A=A8=E6=80=81=E8=B7=AF?= =?UTF-8?q?=E5=BE=84=EF=BC=8C=E5=92=8CIP=E7=AE=A1=E7=90=86=E7=9A=84badge?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/(home)/docs/sidebar.tsx | 6 +++--- src/app/admin/channels/page.tsx | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app/(home)/docs/sidebar.tsx b/src/app/(home)/docs/sidebar.tsx index d5829b5..2af5e28 100644 --- a/src/app/(home)/docs/sidebar.tsx +++ b/src/app/(home)/docs/sidebar.tsx @@ -8,7 +8,7 @@ type Props = { collapsed?: boolean } -// 简化的菜单配置 - 扁平结构,支持分组 +// 菜单配置 - 扁平结构,支持分组 const MENU_ITEMS = [ { group: '官网教程', @@ -70,10 +70,10 @@ const MENU_ITEMS = [ export default function Sidebar({collapsed = false}: Props) { const pathname = usePathname() - // 获取当前文档 key (从 /help/{key} 路径中提取) + // 获取当前文档 key const getCurrentKey = useCallback(() => { const parts = pathname?.split('/') || [] - return parts[2] || '' // /help/{key} -> key + return parts[2] || '' }, [pathname]) const currentKey = getCurrentKey() diff --git a/src/app/admin/channels/page.tsx b/src/app/admin/channels/page.tsx index b650081..154a581 100644 --- a/src/app/admin/channels/page.tsx +++ b/src/app/admin/channels/page.tsx @@ -240,9 +240,9 @@ export default function ChannelsPage(props: ChannelsPageProps) { ) : hasAuth ? (