-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
45 lines (39 loc) · 1.25 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import React from 'react';
import ReactDOM from 'react-dom';
import { BrowserRouter } from 'react-router-dom';
import { Provider } from 'react-redux';
import ReduxToastr from 'react-redux-toastr';
import 'semantic-ui-css/semantic.min.css';
import './index.css';
import 'react-redux-toastr/lib/css/react-redux-toastr.min.css';
import App from './app/layout/App';
import registerServiceWorker from './registerServiceWorker';
import configureStore from './app/store/configureStore';
import ScrollToTop from "./app/common/util/ScrollToTop";
const rootElement = document.getElementById('root');
const store = configureStore();
let render = () => {
ReactDOM.render(
<Provider store={store}>
<BrowserRouter>
<ScrollToTop>
<ReduxToastr
position='bottom-right'
transitionIn='fadeIn'
transitionOut='fadeOut'
/>
<App />
</ScrollToTop>
</BrowserRouter>
</Provider>,
rootElement);
};
if(module.hot) {
module.hot.accept('./app/layout/App', () => {
setTimeout(render);
});
}
store.firebaseAuthIsReady.then(() => {
render();
});
registerServiceWorker();