aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/js/app.js
blob: 5b5d1fc8a4d172b4c9921bbe9a8c8521508068ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import React from "react"
import {render} from 'react-dom'
import {createStore} from 'redux'
import {Provider} from 'react-redux'

import $ from "jquery"
import Connection from "./connection"
import {App} from "./components/proxyapp.js"
import {EventLogActions} from "./actions.js"
import rootReducer from './ducks/index';

let store = createStore(rootReducer);

$(function () {
    window.ws = new Connection("/updates");

    window.onerror = function (msg) {
        EventLogActions.add_event(msg);
    };

    render(
        <Provider store={store}>{App}</Provider>,
        document.getElementById("mitmproxy"));
});