diff options
Diffstat (limited to 'src/client/react/index.js')
-rw-r--r-- | src/client/react/index.js | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/client/react/index.js b/src/client/react/index.js index 566c847..2a66f82 100644 --- a/src/client/react/index.js +++ b/src/client/react/index.js @@ -18,13 +18,14 @@ * */ +import 'babel-polyfill'; +import 'whatwg-fetch'; 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, @@ -37,14 +38,20 @@ import reducer from './reducers'; import Index from './components/page/Index'; 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}> @@ -56,9 +63,9 @@ 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 // redirect. This is because that is when people usually want to start typing. -document.querySelector('.search input').focus(); +document.querySelector('#searchInput').focus(); |