2020-10-31 21:04:46 +01:00
|
|
|
import React from 'react'
|
2020-11-23 00:07:32 +01:00
|
|
|
import { AppearanceProvider } from 'react-native-appearance'
|
2020-11-04 22:26:38 +01:00
|
|
|
import { QueryCache, ReactQueryCacheProvider, setConsole } from 'react-query'
|
2020-11-21 13:19:05 +01:00
|
|
|
import { Provider } from 'react-redux'
|
2020-11-04 22:26:38 +01:00
|
|
|
|
2020-11-23 00:07:32 +01:00
|
|
|
import ThemeManager from 'src/utils/styles/ThemeManager'
|
2020-10-31 21:04:46 +01:00
|
|
|
import { Index } from 'src/Index'
|
2020-11-21 13:32:29 +01:00
|
|
|
import { store } from 'src/store'
|
2020-10-31 21:04:46 +01:00
|
|
|
|
2020-11-04 22:26:38 +01:00
|
|
|
const queryCache = new QueryCache()
|
|
|
|
|
|
|
|
setConsole({
|
|
|
|
log: console.log,
|
|
|
|
warn: console.warn,
|
|
|
|
error: console.warn
|
|
|
|
})
|
|
|
|
|
2020-11-28 17:07:30 +01:00
|
|
|
// if (__DEV__) {
|
|
|
|
// const whyDidYouRender = require('@welldone-software/why-did-you-render')
|
|
|
|
// whyDidYouRender(React, {
|
|
|
|
// trackAllPureComponents: true,
|
|
|
|
// trackHooks: true,
|
|
|
|
// hotReloadBufferMs: 1000
|
|
|
|
// })
|
|
|
|
// }
|
2020-11-17 23:57:23 +01:00
|
|
|
|
2020-11-23 00:07:32 +01:00
|
|
|
const App: React.FC = () => {
|
|
|
|
return (
|
|
|
|
<AppearanceProvider>
|
|
|
|
<ThemeManager>
|
|
|
|
<ReactQueryCacheProvider queryCache={queryCache}>
|
|
|
|
<Provider store={store}>
|
|
|
|
<Index />
|
|
|
|
</Provider>
|
|
|
|
</ReactQueryCacheProvider>
|
|
|
|
</ThemeManager>
|
|
|
|
</AppearanceProvider>
|
|
|
|
)
|
|
|
|
}
|
2020-10-31 21:04:46 +01:00
|
|
|
|
|
|
|
export default App
|