MCPcopy Index your code
hub / github.com/winfunc/opcode / useScreenTracking

Function useScreenTracking

src/hooks/useAnalytics.ts:419–430  ·  view source on GitHub ↗
(tabType?: string, tabId?: string)

Source from the content-addressed store, hash-verified

417
418// Hook for tracking screen changes
419export function useScreenTracking(tabType?: string, tabId?: string) {
420 useEffect(() => {
421 if (tabType) {
422 const screenName = TAB_SCREEN_NAMES[tabType] || tabType;
423 const screenContext = tabId
424 ? `${screenName}/${tabId.substring(0, 8)}`
425 : screenName;
426
427 analytics.setScreen(screenContext);
428 }
429 }, [tabType, tabId]);
430}
431
432// Export screen names for external use
433export { TAB_SCREEN_NAMES };

Callers 1

TabPanelFunction · 0.90

Calls 1

setScreenMethod · 0.80

Tested by

no test coverage detected