Add nav:click event to all main nav items (#10540)

Co-authored-by: Eric Bailey <git@esb.lol>
This commit is contained in:
Alex Benzer
2026-05-26 07:28:40 -07:00
committed by GitHub
parent 1790fddc78
commit 4e2949c93a
10 changed files with 127 additions and 18 deletions
+4 -1
View File
@@ -30,6 +30,7 @@ import {
} from '#/components/Layout/const'
import {ScrollbarOffsetContext} from '#/components/Layout/context'
import {Text} from '#/components/Typography'
import {useAnalytics} from '#/analytics'
import {IS_IOS} from '#/env'
export function Outer({
@@ -150,13 +151,15 @@ export function BackButton({onPress, style, ...props}: Partial<ButtonProps>) {
export function MenuButton() {
const {_} = useLingui()
const ax = useAnalytics()
const setDrawerOpen = useSetDrawerOpen()
const {gtMobile} = useBreakpoints()
const onPress = useCallback(() => {
ax.metric('nav:click', {item: 'menu', surface: 'topBar'})
Keyboard.dismiss()
setDrawerOpen(true)
}, [setDrawerOpen])
}, [setDrawerOpen, ax])
return gtMobile ? null : (
<Slot>