From 7eaa573b57c6fb3a37abe105d4a8de10e9b9f893 Mon Sep 17 00:00:00 2001
From: dan <dan.abramov@gmail.com>
Date: Wed, 13 Mar 2024 22:31:51 +0000
Subject: [Statsig] Track likes, reposts, follows (#3195)

* [Statsig] Track likes

* Move tracking to intent

* Track repost/unrepost

* Track profile follows/unfollows

* Less copy paste

* Reorder
---
 src/lib/statsig/statsig.tsx | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

(limited to 'src/lib/statsig/statsig.tsx')

diff --git a/src/lib/statsig/statsig.tsx b/src/lib/statsig/statsig.tsx
index a46cef4da..5745d204a 100644
--- a/src/lib/statsig/statsig.tsx
+++ b/src/lib/statsig/statsig.tsx
@@ -6,7 +6,9 @@ import {
 } from 'statsig-react-native-expo'
 import {useSession} from '../../state/session'
 import {sha256} from 'js-sha256'
-import {Events} from './events'
+import {LogEvents} from './events'
+
+export type {LogEvents}
 
 const statsigOptions = {
   environment: {
@@ -31,9 +33,9 @@ export function attachRouteToLogEvents(
   getCurrentRouteName = getRouteName
 }
 
-export function logEvent<E extends keyof Events>(
+export function logEvent<E extends keyof LogEvents>(
   eventName: E & string,
-  rawMetadata?: Events[E] & FlatJSONRecord,
+  rawMetadata: LogEvents[E] & FlatJSONRecord,
 ) {
   const fullMetadata = {
     ...rawMetadata,
-- 
cgit 1.4.1

