* Add analytics to the web build (close #233) * Use bsky endpoint for analytics
This commit is contained in:
parent
b100abca0e
commit
f717ff6719
4 changed files with 1010 additions and 20 deletions
|
@ -2,6 +2,7 @@ import React, {useState, useEffect} from 'react'
|
|||
import {SafeAreaProvider} from 'react-native-safe-area-context'
|
||||
import {RootSiblingParent} from 'react-native-root-siblings'
|
||||
import * as view from './view/index'
|
||||
import * as analytics from 'lib/analytics'
|
||||
import {RootStoreModel, setupState, RootStoreProvider} from './state'
|
||||
import {Shell} from './view/shell/index'
|
||||
import {ToastContainer} from './view/com/util/Toast.web'
|
||||
|
@ -16,6 +17,7 @@ function App() {
|
|||
view.setup()
|
||||
setupState().then(store => {
|
||||
setRootStore(store)
|
||||
analytics.init(store)
|
||||
})
|
||||
}, [])
|
||||
|
||||
|
@ -26,12 +28,14 @@ function App() {
|
|||
|
||||
return (
|
||||
<RootSiblingParent>
|
||||
<RootStoreProvider value={rootStore}>
|
||||
<SafeAreaProvider>
|
||||
<Shell />
|
||||
</SafeAreaProvider>
|
||||
<ToastContainer />
|
||||
</RootStoreProvider>
|
||||
<analytics.Provider>
|
||||
<RootStoreProvider value={rootStore}>
|
||||
<SafeAreaProvider>
|
||||
<Shell />
|
||||
</SafeAreaProvider>
|
||||
<ToastContainer />
|
||||
</RootStoreProvider>
|
||||
</analytics.Provider>
|
||||
</RootSiblingParent>
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue