diff options
Diffstat (limited to 'web/src/js/app.jsx')
-rw-r--r-- | web/src/js/app.jsx | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/web/src/js/app.jsx b/web/src/js/app.jsx index 1291df7a..23297f63 100644 --- a/web/src/js/app.jsx +++ b/web/src/js/app.jsx @@ -1,16 +1,15 @@ -import React from "react" +import React from 'react' import { render } from 'react-dom' import { applyMiddleware, createStore } from 'redux' import { Provider } from 'react-redux' import createLogger from 'redux-logger' import thunkMiddleware from 'redux-thunk' -import { Route, Router as ReactRouter, hashHistory, Redirect } from "react-router" +import { Route, Router as ReactRouter, hashHistory, Redirect } from 'react-router' -import Connection from "./connection" -import ProxyApp from "./components/ProxyApp" +import ProxyApp from './components/ProxyApp' import MainView from './components/MainView' import rootReducer from './ducks/index' -import { add as addLog } from "./ducks/eventLog" +import { add as addLog } from './ducks/eventLog' // logger must be last const store = createStore( @@ -18,14 +17,13 @@ const store = createStore( applyMiddleware(thunkMiddleware, createLogger()) ) +// @todo move to ProxyApp window.addEventListener('error', msg => { store.dispatch(addLog(msg)) }) // @todo remove this document.addEventListener('DOMContentLoaded', () => { - window.ws = new Connection("/updates", store.dispatch) - render( <Provider store={store}> <ReactRouter history={hashHistory}> |