2016-07-16 02:06:10 +00:00
|
|
|
import React from 'react';
|
2016-03-20 04:00:40 +00:00
|
|
|
import {render} from 'react-dom'
|
|
|
|
import {Provider} from 'react-redux'
|
2016-04-26 07:29:24 +00:00
|
|
|
import {Tabs} from 'react-tabs'
|
2016-04-23 06:16:23 +00:00
|
|
|
|
2016-07-16 02:06:10 +00:00
|
|
|
import createStore from './redux/create';
|
|
|
|
import App from './containers/App';
|
2016-03-20 04:00:40 +00:00
|
|
|
|
2016-03-18 06:30:48 +00:00
|
|
|
// Global CSS
|
2016-03-16 05:49:42 +00:00
|
|
|
import './css/index.scss'
|
2016-03-16 23:34:25 +00:00
|
|
|
import './css/lib/chrome/platform_app.css'
|
2016-03-16 05:49:42 +00:00
|
|
|
import './css/lib/fontawesome/css/font-awesome.css'
|
2016-07-16 02:06:10 +00:00
|
|
|
import {initStore} from './redux/initstore';
|
|
|
|
import {initDB} from './database';
|
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-04-16 23:24:57 +00:00
|
|
|
|
2016-04-26 07:29:24 +00:00
|
|
|
console.log('-- Loading App --');
|
2016-04-16 23:24:57 +00:00
|
|
|
|
2016-04-26 07:29:24 +00:00
|
|
|
initDB()
|
|
|
|
.then(() => initStore(store.dispatch))
|
|
|
|
.then(() => {
|
|
|
|
console.log('-- Rendering App --');
|
|
|
|
render(
|
|
|
|
<Provider store={store}><App /></Provider>,
|
|
|
|
document.getElementById('root')
|
|
|
|
);
|
2016-04-16 23:24:57 +00:00
|
|
|
});
|