-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
54 lines (44 loc) · 1.51 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
46
47
48
49
50
51
52
53
import React from 'react';
import ReactDOM from 'react-dom';
import { BrowserRouter } from 'react-router-dom'
import 'semantic-ui-css/semantic.min.css'
import './index.css';
import 'react-redux-toastr/lib/css/react-redux-toastr.min.css';
import ReduxToastr from 'react-redux-toastr';
import App from './app/layout/App';
import * as serviceWorker from './serviceWorker';
import { Provider } from 'react-redux';
import { configureStore } from './app/store/configureStore';
import ScrollToTop from './app/common/util/ScrollToTop';
//import { loadEvents } from './features/event/eventActions';
const rootEl = document.getElementById('root');
const store = configureStore();
//store.dispatch(loadEvents());
let render = () => {
ReactDOM.render(
<Provider store={store}>
<BrowserRouter>
<ScrollToTop>
<ReduxToastr
position='bottom-right'
transitionIn ='fadeIn'
transitionOut ='fadeOut'
/>
<App />
</ScrollToTop>
</BrowserRouter>
</Provider>
, rootEl)
}
if (module.hot) {
module.hot.accept('./app/layout/App', () => {
setTimeout(render)
});
}
store.firebaseAuthIsReady.then(() => {
render();
})
// 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
serviceWorker.unregister();