1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-11-28 11:18:16 +00:00
trezor-wallet/src/index.js
2018-09-12 16:27:45 +02:00

19 lines
492 B
JavaScript

/* @flow */
import React from 'react';
import { render } from 'react-dom';
import baseStyles from 'support/BaseStyles';
import { onBeforeUnload } from 'actions/WalletActions';
import App from 'views/index';
import store from './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