-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
28 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,27 @@ | ||
import {init} from '@bitdrift/react-native' | ||
import {Statsig} from 'statsig-react-native-expo' | ||
export {debug, error, info, warn} from '@bitdrift/react-native' | ||
// import {init} from '@bitdrift/react-native' | ||
// import {Statsig} from 'statsig-react-native-expo' | ||
// export {debug, error, info, warn} from '@bitdrift/react-native' | ||
|
||
import {initPromise} from './statsig/statsig' | ||
// import {initPromise} from './statsig/statsig' | ||
|
||
const BITDRIFT_API_KEY = process.env.BITDRIFT_API_KEY | ||
// const BITDRIFT_API_KEY = process.env.BITDRIFT_API_KEY | ||
|
||
initPromise.then(() => { | ||
let isEnabled = false | ||
try { | ||
if (Statsig.checkGate('enable_bitdrift')) { | ||
isEnabled = true | ||
} | ||
} catch (e) { | ||
// Statsig may complain about it being called too early. | ||
} | ||
if (isEnabled && BITDRIFT_API_KEY) { | ||
init(BITDRIFT_API_KEY, {url: 'https://api-bsky.bitdrift.io'}) | ||
} | ||
}) | ||
// initPromise.then(() => { | ||
// let isEnabled = false | ||
// try { | ||
// if (Statsig.checkGate('enable_bitdrift')) { | ||
// isEnabled = true | ||
// } | ||
// } catch (e) { | ||
// // Statsig may complain about it being called too early. | ||
// } | ||
// if (isEnabled && BITDRIFT_API_KEY) { | ||
// init(BITDRIFT_API_KEY, {url: 'https://api-bsky.bitdrift.io'}) | ||
// } | ||
// }) | ||
|
||
// TODO: Reenable when the build issue is fixed. | ||
export function debug(_message: string) {} | ||
export function error(_message: string) {} | ||
export function info(_message: string) {} | ||
export function warn(_message: string) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters