diff options
author | Jason <jason.daurus@gmail.com> | 2016-06-15 01:18:10 +0800 |
---|---|---|
committer | Jason <jason.daurus@gmail.com> | 2016-06-17 07:26:29 +0800 |
commit | 16a28eca258e07d45c7e2a8ee95368d4eb077d4d (patch) | |
tree | 50c0bf08f6b2e59ca363e022fb4c9ee6729301c4 /web/src/js/app.jsx | |
parent | 1fc2db85fa339f9b134d45c15d2ad4cf3d681070 (diff) | |
download | mitmproxy-16a28eca258e07d45c7e2a8ee95368d4eb077d4d.tar.gz mitmproxy-16a28eca258e07d45c7e2a8ee95368d4eb077d4d.tar.bz2 mitmproxy-16a28eca258e07d45c7e2a8ee95368d4eb077d4d.zip |
[web] websocket
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 8fa52a00..643bb8b7 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 { addLogEntry } from "./ducks/eventLog" +import { addLogEntry } 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(addLogEntry(msg)) }) // @todo remove this document.addEventListener('DOMContentLoaded', () => { - window.ws = new Connection("/updates", store.dispatch) - render( <Provider store={store}> <ReactRouter history={hashHistory}> |