web client v 0.1

This commit is contained in:
2020-09-17 19:01:01 +02:00
parent 2b378fab25
commit 1c9d9e2021
20 changed files with 794 additions and 208 deletions

View File

@@ -5,23 +5,30 @@ import { Provider } from "react-redux";
import "./index.scss";
import App from "./App";
import * as serviceWorker from "./serviceWorker";
import rootReducer from "./reducers";
import thunk from "redux-thunk";
import { createBrowserHistory } from "history";
import { createStore, applyMiddleware, compose } from "redux";
import { routerMiddleware, ConnectedRouter } from "connected-react-router";
import rootReducer from "./reducers";
const history = createBrowserHistory();
ReactGA.initialize("G-SHB9LXPWWM");
ReactGA.pageview("/");
const store = createStore(
rootReducer,
rootReducer(history),
compose(
applyMiddleware(thunk),
applyMiddleware(routerMiddleware(history), thunk),
window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
)
);
ReactDOM.render(
<Provider store={store}>
<App />
<ConnectedRouter history={history}>
<App history={history} />
</ConnectedRouter>
</Provider>,
document.getElementById("root")
);