hi!
when i get a custom function from a component i get this error. what could be the reason?
this is a function
const useClickHandler = (onClick) => {
const tracking = useDi(ANALYTICS_TOKEN);
const showOnboardingPopup = useOnboardingPopupTrigger();
const isMobileContent = useIsMobileContent();
const handleClick = useCallback((e) => {
tracking.event(EVENT_ACQUISITION_BTN_CLICK, { asLink: true });
if (!isMobileContent) {
e.preventDefault();
e.stopPropagation();
showOnboardingPopup && showOnboardingPopup();
}
onClick && onClick();
}, [onClick]);
return handleClick;
};
this is an error
[ReferenceError: event is not defined]
why is this happening?