1
0
mirror of https://github.com/oceanprotocol/commons.git synced 2023-03-15 18:03:00 +01:00
commons/client/src/index.tsx

28 lines
694 B
TypeScript
Raw Normal View History

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-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()
// 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()