aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoah Loomans <noahloomans@gmail.com>2018-03-24 15:57:52 +0100
committerNoah Loomans <noahloomans@gmail.com>2018-03-24 15:57:52 +0100
commitf8686cb6d0fd155574e825a1784372d843ab1fe3 (patch)
tree4b6e989daceb2b2d35c1e54a145b733520be9ecb
parent94e1db8b37a3a59e785724e5b9eda6887c1fb646 (diff)
Remove redux-logger
-rw-r--r--package.json1
-rw-r--r--src/client/react/index.js15
-rw-r--r--yarn.lock10
3 files changed, 9 insertions, 17 deletions
diff --git a/package.json b/package.json
index 2459fe7..73bdcfd 100644
--- a/package.json
+++ b/package.json
@@ -42,7 +42,6 @@
"react-redux": "^5.0.6",
"react-router-dom": "^4.2.2",
"redux": "^3.7.2",
- "redux-logger": "^3.0.6",
"rmwc": "^1.2.0"
},
"devDependencies": {
diff --git a/src/client/react/index.js b/src/client/react/index.js
index 2443ced..5fa7d0d 100644
--- a/src/client/react/index.js
+++ b/src/client/react/index.js
@@ -22,9 +22,8 @@ import React from 'react';
import ReactDOM from 'react-dom';
import moment from 'moment';
-import { createStore, applyMiddleware, compose } from 'redux';
+import { createStore } from 'redux';
import { Provider } from 'react-redux';
-import logger from 'redux-logger';
import {
BrowserRouter as Router,
@@ -39,14 +38,18 @@ import User from './components/page/User';
import './index.scss';
+// Set the locale for moment.js to dutch. This ensures that the correct week
+// number logic is used.
moment.locale('nl');
-// eslint-disable-next-line no-underscore-dangle
-const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
+/* eslint-disable no-underscore-dangle */
const store = createStore(
reducer,
- composeEnhancers(applyMiddleware(logger)),
+ // Redux devtools extension
+ // https://github.com/zalmoxisus/redux-devtools-extension
+ window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__(),
);
+/* eslint-enable no-underscore-dangle */
ReactDOM.render(
<Provider store={store}>
@@ -58,7 +61,7 @@ ReactDOM.render(
</Switch>
</Router>
</Provider>,
- document.getElementById('root'),
+ document.querySelector('#root'),
);
// We only want to focus the input on page load. NOT on a in-javascript
diff --git a/yarn.lock b/yarn.lock
index 048face..7085411 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2077,10 +2077,6 @@ decode-uri-component@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545"
-deep-diff@^0.3.5:
- version "0.3.8"
- resolved "https://registry.yarnpkg.com/deep-diff/-/deep-diff-0.3.8.tgz#c01de63efb0eec9798801d40c7e0dae25b582c84"
-
deep-extend@~0.4.0:
version "0.4.2"
resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.4.2.tgz#48b699c27e334bf89f10892be432f6e4c7d34a7f"
@@ -5412,12 +5408,6 @@ reduce-function-call@^1.0.1:
dependencies:
balanced-match "^0.4.2"
-redux-logger@^3.0.6:
- version "3.0.6"
- resolved "https://registry.yarnpkg.com/redux-logger/-/redux-logger-3.0.6.tgz#f7555966f3098f3c88604c449cf0baf5778274bf"
- dependencies:
- deep-diff "^0.3.5"
-
redux@^3.7.2:
version "3.7.2"
resolved "https://registry.yarnpkg.com/redux/-/redux-3.7.2.tgz#06b73123215901d25d065be342eb026bc1c8537b"