mirror of
https://github.com/trezor/trezor-wallet
synced 2025-07-15 19:18:21 +00:00
18 lines
472 B
JavaScript
18 lines
472 B
JavaScript
/* @flow */
|
|
import React from 'react';
|
|
import { render } from 'react-dom';
|
|
import store from './store';
|
|
import App from './router';
|
|
import { onBeforeUnload } from './actions/WalletActions';
|
|
import styles from '~/styles/index.less';
|
|
|
|
const root: ?HTMLElement = document.getElementById('root');
|
|
if (root) {
|
|
render(<App />, root);
|
|
}
|
|
|
|
window.onbeforeunload = () => {
|
|
store.dispatch(onBeforeUnload());
|
|
};
|
|
|
|
// Application life cycle starts in ./services/WalletService.js
|