UNPKG

@applicaster/zapp-react-native-utils

Version:

Applicaster Zapp React Native utilities package

22 lines (17 loc) 590 B
import { log_debug } from "../logger"; import { ANALYTICS_CORE_EVENTS } from "../events"; import { postAnalyticEvent } from "../manager"; export const sendOnNavItemClickEvent = ({ extraProps }) => { const navigationItem: QuickBrickNavigationData = extraProps.item; const eventName = ANALYTICS_CORE_EVENTS.TAP_MENU; const analyticsProps = { selected_area: navigationItem?.title, }; postAnalyticEvent(eventName, analyticsProps); log_debug( `sendOnNavItemClickEvent: send event: ${eventName}, title: ${navigationItem?.title}`, { analyticsProps, } ); };