-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.js
44 lines (40 loc) · 1.13 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
import React from "react";
import ReactDOM from "react-dom";
import { BrowserRouter } from "react-router-dom";
import { Provider } from "react-redux";
import "semantic-ui-css/semantic.min.css";
import "react-redux-toastr/lib/css/react-redux-toastr.min.css";
import ReduxToastr from "react-redux-toastr";
import "./index.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 store = configureStore();
const rootEl = document.getElementById("root");
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();
});
registerServiceWorker();