about summary refs log tree commit diff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/statsig/gates.ts11
-rw-r--r--src/lib/statsig/statsig.tsx3
2 files changed, 10 insertions, 4 deletions
diff --git a/src/lib/statsig/gates.ts b/src/lib/statsig/gates.ts
index fce25cb88..c755ad437 100644
--- a/src/lib/statsig/gates.ts
+++ b/src/lib/statsig/gates.ts
@@ -1,3 +1,8 @@
-import {useGate} from './statsig'
-
-export const useNewSearchGate = () => useGate('new_search')
+export type Gate =
+  // Keep this alphabetic please.
+  | 'autoexpand_suggestions_on_profile_follow'
+  | 'disable_min_shell_on_foregrounding'
+  | 'disable_poll_on_discover'
+  | 'new_search'
+  | 'show_follow_back_label'
+  | 'start_session_with_following'
diff --git a/src/lib/statsig/statsig.tsx b/src/lib/statsig/statsig.tsx
index c16461621..18b58d16d 100644
--- a/src/lib/statsig/statsig.tsx
+++ b/src/lib/statsig/statsig.tsx
@@ -11,6 +11,7 @@ import {
 import {logger} from '#/logger'
 import {useSession} from '../../state/session'
 import {LogEvents} from './events'
+import {Gate} from './gates'
 
 export type {LogEvents}
 
@@ -69,7 +70,7 @@ export function logEvent<E extends keyof LogEvents>(
   }
 }
 
-export function useGate(gateName: string) {
+export function useGate(gateName: Gate): boolean {
   const {isLoading, value} = useStatsigGate(gateName)
   if (isLoading) {
     // This should not happen because of waitForInitialization={true}.