···1-import {init} from '@bitdrift/react-native'
2-import {Statsig} from 'statsig-react-native-expo'
3-export {debug, error, info, warn} from '@bitdrift/react-native'
45-import {initPromise} from './statsig/statsig'
67-const BITDRIFT_API_KEY = process.env.BITDRIFT_API_KEY
89-initPromise.then(() => {
10- let isEnabled = false
11- try {
12- if (Statsig.checkGate('enable_bitdrift')) {
13- isEnabled = true
14- }
15- } catch (e) {
16- // Statsig may complain about it being called too early.
17- }
18- if (isEnabled && BITDRIFT_API_KEY) {
19- init(BITDRIFT_API_KEY, {url: 'https://api-bsky.bitdrift.io'})
20- }
21-})
000000
···1+// import {init} from '@bitdrift/react-native'
2+// import {Statsig} from 'statsig-react-native-expo'
3+// export {debug, error, info, warn} from '@bitdrift/react-native'
45+// import {initPromise} from './statsig/statsig'
67+// const BITDRIFT_API_KEY = process.env.BITDRIFT_API_KEY
89+// initPromise.then(() => {
10+// let isEnabled = false
11+// try {
12+// if (Statsig.checkGate('enable_bitdrift')) {
13+// isEnabled = true
14+// }
15+// } catch (e) {
16+// // Statsig may complain about it being called too early.
17+// }
18+// if (isEnabled && BITDRIFT_API_KEY) {
19+// init(BITDRIFT_API_KEY, {url: 'https://api-bsky.bitdrift.io'})
20+// }
21+// })
22+23+// TODO: Reenable when the build issue is fixed.
24+export function debug(_message: string) {}
25+export function error(_message: string) {}
26+export function info(_message: string) {}
27+export function warn(_message: string) {}
+4-2
src/lib/statsig/statsig.tsx
···5import {Statsig, StatsigProvider} from 'statsig-react-native-expo'
67import {BUNDLE_DATE, BUNDLE_IDENTIFIER, IS_TESTFLIGHT} from '#/lib/app-info'
8-import * as bitdrift from '#/lib/bitdrift'
09import {logger} from '#/logger'
10import {isWeb} from '#/platform/detection'
11import * as persisted from '#/state/persisted'
···107 console.groupCollapsed(eventName)
108 console.log(fullMetadata)
109 console.groupEnd()
110- bitdrift.info(eventName, fullMetadata)
0111 } catch (e) {
112 // A log should never interrupt the calling code, whatever happens.
113 logger.error('Failed to log an event', {message: e})
···5import {Statsig, StatsigProvider} from 'statsig-react-native-expo'
67import {BUNDLE_DATE, BUNDLE_IDENTIFIER, IS_TESTFLIGHT} from '#/lib/app-info'
8+// TODO: Reenable when the build issue is fixed.
9+// import * as bitdrift from '#/lib/bitdrift'
10import {logger} from '#/logger'
11import {isWeb} from '#/platform/detection'
12import * as persisted from '#/state/persisted'
···108 console.groupCollapsed(eventName)
109 console.log(fullMetadata)
110 console.groupEnd()
111+ // TODO: Reenable when the build issue is fixed.
112+ // bitdrift.info(eventName, fullMetadata)
113 } catch (e) {
114 // A log should never interrupt the calling code, whatever happens.
115 logger.error('Failed to log an event', {message: e})