2016-07-16 02:06:10 +00:00
|
|
|
import React from 'react';
|
2016-11-07 20:24:38 +00:00
|
|
|
import {render} from 'react-dom';
|
|
|
|
import {Provider} from 'react-redux';
|
|
|
|
import {Tabs} from 'react-tabs';
|
2016-07-16 02:06:10 +00:00
|
|
|
import createStore from './redux/create';
|
|
|
|
import App from './containers/App';
|
2016-10-21 17:20:36 +00:00
|
|
|
import './css/lib/fontawesome/css/font-awesome.css';
|
|
|
|
import './css/lib/fonts/open-sans.css';
|
|
|
|
import './css/index.less';
|
|
|
|
import './css/lib/chrome/platform_app.css';
|
2016-11-16 17:18:39 +00:00
|
|
|
import {init as initStore} from './redux/modules';
|
|
|
|
import {init as initDB} from '../common/database';
|
|
|
|
import {init as initSync} from '../sync';
|
|
|
|
import {init as initAnalytics} from '../analytics';
|
2016-11-09 03:18:25 +00:00
|
|
|
import * as session from '../sync/session';
|
2016-11-10 05:56:23 +00:00
|
|
|
import * as models from '../models';
|
2016-03-16 05:49:42 +00:00
|
|
|
|
2016-04-26 07:29:24 +00:00
|
|
|
// Don't inject component styles (use our own)
|
|
|
|
Tabs.setUseDefaultStyles(false);
|
2016-04-16 23:24:57 +00:00
|
|
|
|
2016-04-26 07:29:24 +00:00
|
|
|
export const store = createStore();
|
2016-10-29 05:40:09 +00:00
|
|
|
const accountId = session.getAccountId();
|
|
|
|
|
2016-10-02 20:57:00 +00:00
|
|
|
(async function () {
|
2016-11-10 01:15:27 +00:00
|
|
|
await initDB(models.types());
|
2016-10-21 17:20:36 +00:00
|
|
|
await initSync();
|
2016-10-02 20:57:00 +00:00
|
|
|
await initStore(store.dispatch);
|
2016-10-29 05:40:09 +00:00
|
|
|
await initAnalytics(accountId);
|
2016-10-02 20:57:00 +00:00
|
|
|
render(
|
|
|
|
<Provider store={store}><App /></Provider>,
|
|
|
|
document.getElementById('root')
|
|
|
|
);
|
|
|
|
})();
|