mirror of
https://github.com/trezor/trezor-wallet
synced 2024-11-28 11:18:16 +00:00
19 lines
492 B
JavaScript
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
|