2017-12-13 11:01:37 +00:00
|
|
|
/* @flow */
|
|
|
|
import React from 'react';
|
|
|
|
import { render } from 'react-dom';
|
2018-08-14 12:56:47 +00:00
|
|
|
import baseStyles from 'support/BaseStyles';
|
2018-08-14 13:11:52 +00:00
|
|
|
import { onBeforeUnload } from 'actions/WalletActions';
|
2018-08-14 14:06:34 +00:00
|
|
|
import 'styles/index.less';
|
2018-08-16 10:19:13 +00:00
|
|
|
import App from 'views/index';
|
2018-08-27 15:19:34 +00:00
|
|
|
import store from 'support/store';
|
2017-12-13 11:01:37 +00:00
|
|
|
|
2018-04-16 21:19:50 +00:00
|
|
|
const root: ?HTMLElement = document.getElementById('root');
|
|
|
|
if (root) {
|
2018-08-10 16:28:35 +00:00
|
|
|
baseStyles();
|
2018-08-13 12:52:43 +00:00
|
|
|
render(<App />, 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-07-30 10:52:13 +00:00
|
|
|
store.dispatch(onBeforeUnload());
|
|
|
|
};
|
2018-02-20 09:30:36 +00:00
|
|
|
|
2018-08-14 13:18:16 +00:00
|
|
|
// Application life cycle starts in services/WalletService.js
|