-
Notifications
You must be signed in to change notification settings - Fork 8
/
App.tsx
36 lines (31 loc) · 1.08 KB
/
App.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import { useOneSignal } from 'hooks/useOneSignal'
import React, { useEffect } from 'react'
import { LogBox } from 'react-native'
import { QueryClient, QueryClientProvider } from 'react-query'
import { UserSettingsContextProvider } from 'contexts/UserSettingsProvider'
import { Analytics } from 'services/analytics'
import Smartlook from 'smartlook-react-native-wrapper'
import { SMARTLOOK_API_KEY } from '@env'
import { Main } from './src/Main'
LogBox.ignoreLogs([
'Require cycle: index.js',
'Require cycle: node_modules',
'`new NativeEventEmitter()`',
'EventEmitter.removeListener',
'Could not find Fiber with id', // it shows only with flipper and its annoying
])
export const queryClient = new QueryClient()
export const App = () => {
useOneSignal()
useEffect(() => {
Analytics().track('APP_LAUNCH')
if (SMARTLOOK_API_KEY && !__DEV__) Smartlook.setupAndStartRecording(SMARTLOOK_API_KEY)
}, [])
return (
<QueryClientProvider client={queryClient}>
<UserSettingsContextProvider>
<Main />
</UserSettingsContextProvider>
</QueryClientProvider>
)
}