(tabType?: string, tabId?: string)
| 417 | |
| 418 | // Hook for tracking screen changes |
| 419 | export 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 |
| 433 | export { TAB_SCREEN_NAMES }; |