1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-11-24 01:08:27 +00:00

Merge pull request #140 from trezor/fix/disable-react

Disable whole app on "window.onbeforeunload" event
This commit is contained in:
Vladimir Volek 2018-10-09 12:14:52 +02:00 committed by GitHub
commit 2831b7d254
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,9 +2,7 @@
import React from 'react';
import { render } from 'react-dom';
import baseStyles from 'support/styles';
import { onBeforeUnload } from 'actions/WalletActions';
import App from 'views/index';
import store from './store';
const root: ?HTMLElement = document.getElementById('root');
if (root) {
@ -13,7 +11,8 @@ if (root) {
}
window.onbeforeunload = () => {
store.dispatch(onBeforeUnload());
// $FlowIssue: render empty component
render(null, root);
};
// Application life cycle starts in services/WalletService.js