MCPcopy Create free account
hub / github.com/winfunc/opcode / handleUnload

Function handleUnload

src/hooks/useAnalytics.ts:376–379  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

374
375 // Track app close
376 const handleUnload = () => {
377 analytics.track(ANALYTICS_EVENTS.APP_CLOSED);
378 analytics.shutdown();
379 };
380
381 window.addEventListener('beforeunload', handleUnload);
382 return () => window.removeEventListener('beforeunload', handleUnload);

Callers

nothing calls this directly

Calls 2

trackMethod · 0.80
shutdownMethod · 0.80

Tested by

no test coverage detected