2019-01-23 11:15:27 +01:00
|
|
|
import React from 'react'
|
|
|
|
import ReactDOM from 'react-dom'
|
2019-04-30 19:19:28 +02:00
|
|
|
import UserProvider from './context/UserProvider'
|
2019-01-23 11:15:27 +01:00
|
|
|
import App from './App'
|
|
|
|
import * as serviceWorker from './serviceWorker'
|
2019-01-18 17:34:40 +01:00
|
|
|
|
2019-04-30 19:19:28 +02:00
|
|
|
function renderToDOM() {
|
|
|
|
const root = document.getElementById('root')
|
|
|
|
|
|
|
|
if (root !== null) {
|
|
|
|
ReactDOM.render(
|
|
|
|
<UserProvider>
|
|
|
|
<App />
|
|
|
|
</UserProvider>,
|
|
|
|
root
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export { renderToDOM }
|
|
|
|
|
|
|
|
renderToDOM()
|
2019-01-18 17:34:40 +01:00
|
|
|
|
|
|
|
// If you want your app to work offline and load faster, you can change
|
|
|
|
// unregister() to register() below. Note this comes with some pitfalls.
|
|
|
|
// Learn more about service workers: http://bit.ly/CRA-PWA
|
2019-01-23 11:15:27 +01:00
|
|
|
serviceWorker.unregister()
|