From 17bbb92da15df2a0f2f265c7122455788822ea75 Mon Sep 17 00:00:00 2001 From: xujiang Date: Wed, 9 Jul 2025 09:22:29 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20navigation.tsx=20?= =?UTF-8?q?=E4=B8=AD=E7=9A=84=20TypeScript=20=E7=B1=BB=E5=9E=8B=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修正 handleTabClick 函数的参数类型定义 - 将 icon 属性改为 href 属性以匹配实际的 navItems 数据结构 - 现在类型检查可以正常通过 --- frontend/components/navigation.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/components/navigation.tsx b/frontend/components/navigation.tsx index bf1b7be..b13426e 100644 --- a/frontend/components/navigation.tsx +++ b/frontend/components/navigation.tsx @@ -19,7 +19,7 @@ export function Navigation({ activeTab, onTabChange }: NavigationProps) { { id: "contact", name: "联系", href: "#contact" }, ] - const handleTabClick = (item: { id: string; name: string; icon: React.ReactNode }) => { + const handleTabClick = (item: { id: string; name: string; href: string }) => { // Handle all tabs, not just gallery and timeline onTabChange(item.id) setIsMenuOpen(false)