2020-10-31 21:04:46 +01:00
|
|
|
import React from 'react'
|
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-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-17 23:57:23 +01:00
|
|
|
if (__DEV__) {
|
|
|
|
const whyDidYouRender = require('@welldone-software/why-did-you-render')
|
2020-11-19 22:45:26 +01:00
|
|
|
// whyDidYouRender(React)
|
2020-11-17 23:57:23 +01:00
|
|
|
}
|
|
|
|
|
2020-11-04 22:26:38 +01:00
|
|
|
const App: React.FC = () => (
|
|
|
|
<ReactQueryCacheProvider queryCache={queryCache}>
|
2020-11-21 13:19:05 +01:00
|
|
|
<Provider store={store}>
|
|
|
|
<Index />
|
|
|
|
</Provider>
|
2020-11-04 22:26:38 +01:00
|
|
|
</ReactQueryCacheProvider>
|
|
|
|
)
|
2020-10-31 21:04:46 +01:00
|
|
|
|
|
|
|
export default App
|