fix: 修复 navigation.tsx 中的 TypeScript 类型错误
Some checks failed
Deploy Frontend / deploy (push) Failing after 2m58s
Some checks failed
Deploy Frontend / deploy (push) Failing after 2m58s
- 修正 handleTabClick 函数的参数类型定义 - 将 icon 属性改为 href 属性以匹配实际的 navItems 数据结构 - 现在类型检查可以正常通过
This commit is contained in:
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user