diff --git a/src/components/Navbars/HomeNavbar.js b/src/components/Navbars/HomeNavbar.js index 689b84cd..288b3b0c 100644 --- a/src/components/Navbars/HomeNavbar.js +++ b/src/components/Navbars/HomeNavbar.js @@ -51,6 +51,7 @@ import SubscriptionButton from '../Subscription/SubscriptionButton'; import SubscriptionModal from '../Subscription/SubscriptionModal'; import { CrownIcon, TooltipContent } from '../Subscription/CrownTooltip'; import InvestmentCalendar from '../../views/Community/components/InvestmentCalendar'; +import { useNavigationEvents } from '../../hooks/useNavigationEvents'; /** 二级导航栏组件 - 显示当前一级菜单下的所有二级菜单项 */ const SecondaryNav = ({ showCompletenessAlert }) => { @@ -61,6 +62,9 @@ const SecondaryNav = ({ showCompletenessAlert }) => { // ⚠️ 必须在组件顶层调用所有Hooks(不能在JSX中调用) const borderColorValue = useColorModeValue('gray.200', 'gray.600'); + // 🎯 初始化导航埋点Hook + const navEvents = useNavigationEvents({ component: 'secondary_nav' }); + // 定义二级导航结构 const secondaryNavConfig = { '/community': { @@ -162,7 +166,11 @@ const SecondaryNav = ({ showCompletenessAlert }) => { ) : (