aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/js/app.js
blob: 308976868c06e82ffa8c87c80af1120c9a7a6bb7 (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 mitmproxyApp from './reducers'

import $ from "jquery"
import Connection from "./connection"
import {App} from "./components/proxyapp.js"
import {EventLogActions} from "./actions.js"

let store = createStore(mitmproxyApp);

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

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

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