1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-11-30 20:28:09 +00:00
trezor-wallet/src/index.js
2019-03-04 13:33:02 +01:00

26 lines
604 B
JavaScript

/* @flow */
import React from 'react';
import { render } from 'react-dom';
import { Normalize } from 'styled-normalize';
import BaseStyles from 'support/styles';
import App from 'views/index';
const root: ?HTMLElement = document.getElementById('trezor-wallet-root');
if (root) {
render(
<React.Fragment>
<Normalize />
<BaseStyles />
<App />
</React.Fragment>,
root
);
}
window.onbeforeunload = () => {
// $FlowIssue: render empty component
render(null, root);
};
// Application life cycle starts in services/WalletService.js