1
0
mirror of https://github.com/trezor/trezor-wallet synced 2025-02-17 18:42:01 +00:00
trezor-wallet/src/index.js
2018-08-27 17:19:34 +02:00

20 lines
526 B
JavaScript

/* @flow */
import React from 'react';
import { render } from 'react-dom';
import baseStyles from 'support/BaseStyles';
import { onBeforeUnload } from 'actions/WalletActions';
import 'styles/index.less';
import App from 'views/index';
import store from 'support/store';
const root: ?HTMLElement = document.getElementById('root');
if (root) {
baseStyles();
render(<App />, root);
}
window.onbeforeunload = () => {
store.dispatch(onBeforeUnload());
};
// Application life cycle starts in services/WalletService.js