diff options
author | Joffrey BION <joffrey.bion@gmail.com> | 2019-05-16 23:48:38 +0200 |
---|---|---|
committer | Joffrey BION <joffrey.bion@gmail.com> | 2019-05-16 23:48:38 +0200 |
commit | 2382a452456e4bdef4584e1046925e372624cb79 (patch) | |
tree | 0e49b2e5d81facb55fb8b08228abeb218a27d466 /sw-ui/src/index.tsx | |
parent | Remove GRADLE_METADATA feature to avoid breaking frontend build (diff) | |
download | seven-wonders-2382a452456e4bdef4584e1046925e372624cb79.tar.gz seven-wonders-2382a452456e4bdef4584e1046925e372624cb79.tar.bz2 seven-wonders-2382a452456e4bdef4584e1046925e372624cb79.zip |
Rationalize module names
Diffstat (limited to 'sw-ui/src/index.tsx')
-rw-r--r-- | sw-ui/src/index.tsx | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/sw-ui/src/index.tsx b/sw-ui/src/index.tsx new file mode 100644 index 00000000..fce90915 --- /dev/null +++ b/sw-ui/src/index.tsx @@ -0,0 +1,21 @@ +import '@blueprintjs/core/lib/css/blueprint.css'; +import React from 'react'; +import ReactDOM from 'react-dom'; +import { Provider } from 'react-redux'; +import { ConnectedRouter } from 'react-router-redux'; +import { Application } from './components/Application'; +import { INITIAL_STATE } from './reducers'; +import { configureStore } from './store'; + +const { store, history } = configureStore(INITIAL_STATE); + +const rootElement = document.getElementById('root'); +if (rootElement) { + ReactDOM.render(<Provider store={store}> + <ConnectedRouter history={history}> + <Application/> + </ConnectedRouter> + </Provider>, rootElement); +} else { + console.error('Element with ID "root" was not found, cannot bootstrap react app'); +} |