about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorSamuel Newman <mozzius@protonmail.com>2025-02-14 19:50:08 +0000
committerGitHub <noreply@github.com>2025-02-14 19:50:08 +0000
commit11616846caa69ee1b2eacc87e1e307b47df223a5 (patch)
treec61143ebbcd49164541b3676ec07868d290c94e3 /src
parenta14704ddfe83b31a33cfeaeea0a8f48b49396172 (diff)
downloadvoidsky-11616846caa69ee1b2eacc87e1e307b47df223a5.tar.zst
Reenable router events (#7735)
* reenable router events

* remove  field
Diffstat (limited to 'src')
-rw-r--r--src/Navigation.tsx9
-rw-r--r--src/lib/statsig/events.ts4
2 files changed, 8 insertions, 5 deletions
diff --git a/src/Navigation.tsx b/src/Navigation.tsx
index 0dcce98bf..709a7b9ff 100644
--- a/src/Navigation.tsx
+++ b/src/Navigation.tsx
@@ -721,15 +721,16 @@ function RoutesContainer({children}: React.PropsWithChildren<{}>) {
       linking={LINKING}
       theme={theme}
       onStateChange={() => {
-        const routeName = getCurrentRouteName()
-        if (routeName === 'Notifications') {
-          logEvent('router:navigate:notifications', {})
-        }
+        logEvent('lake:router:navigate', {
+          from: prevLoggedRouteName.current,
+        })
+        prevLoggedRouteName.current = getCurrentRouteName()
       }}
       onReady={() => {
         attachRouteToLogEvents(getCurrentRouteName)
         logModuleInitTime()
         onReady()
+        logEvent('lake:router:navigate', {})
       }}>
       {children}
     </NavigationContainer>
diff --git a/src/lib/statsig/events.ts b/src/lib/statsig/events.ts
index 2014f31f5..9a45a620e 100644
--- a/src/lib/statsig/events.ts
+++ b/src/lib/statsig/events.ts
@@ -30,7 +30,9 @@ export type LogEvents = {
     secondsActive: number
   }
   'state:foreground': {}
-  'router:navigate:notifications': {}
+  'lake:router:navigate': {
+    from?: string
+  }
   'deepLink:referrerReceived': {
     to: string
     referrer: string