2017-12-13 11:01:37 +00:00
|
|
|
/* @flow */
|
|
|
|
import React from 'react';
|
|
|
|
import { render } from 'react-dom';
|
2018-12-10 11:13:49 +00:00
|
|
|
import { Normalize } from 'styled-normalize';
|
2018-12-07 14:01:17 +00:00
|
|
|
import BaseStyles from 'support/styles';
|
2018-08-16 10:19:13 +00:00
|
|
|
import App from 'views/index';
|
2017-12-13 11:01:37 +00:00
|
|
|
|
2018-10-30 12:26:00 +00:00
|
|
|
const root: ?HTMLElement = document.getElementById('trezor-wallet-root');
|
2018-04-16 21:19:50 +00:00
|
|
|
if (root) {
|
2018-12-07 14:01:17 +00:00
|
|
|
render(
|
|
|
|
<React.Fragment>
|
2018-12-10 11:13:49 +00:00
|
|
|
<Normalize />
|
2018-12-07 14:01:17 +00:00
|
|
|
<BaseStyles />
|
|
|
|
<App />
|
|
|
|
</React.Fragment>,
|
|
|
|
root,
|
|
|
|
);
|
2018-04-16 21:19:50 +00:00
|
|
|
}
|
2017-12-13 11:01:37 +00:00
|
|
|
|
2018-02-20 09:30:36 +00:00
|
|
|
window.onbeforeunload = () => {
|
2018-10-09 08:54:07 +00:00
|
|
|
// $FlowIssue: render empty component
|
|
|
|
render(null, root);
|
2018-07-30 10:52:13 +00:00
|
|
|
};
|
2018-02-20 09:30:36 +00:00
|
|
|
|
2018-08-14 13:18:16 +00:00
|
|
|
// Application life cycle starts in services/WalletService.js
|