You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
trezor-wallet/src/js/index.js

25 lines
603 B

7 years ago
/* @flow */
'use strict';
import React from 'react';
import { render } from 'react-dom';
7 years ago
import store from './store';
7 years ago
import router from './router';
import { onBeforeUnload } from './actions/WalletActions';
import styles from '~/styles/index.less';
7 years ago
const root: ?HTMLElement = document.getElementById('root');
if (root) {
render(router, root);
}
7 years ago
7 years ago
window.onbeforeunload = () => {
store.dispatch( onBeforeUnload() );
}
6 years ago
if (typeof module !== undefined && module.hasOwnProperty('hot')) {
6 years ago
// $FlowIssue
module.hot.accept();
6 years ago
}
// Application life cycle starts in ./services/WalletService.js