insomnia/app/index.js

32 lines
797 B
JavaScript
Raw Normal View History

import React from 'react';
2016-03-20 04:00:40 +00:00
import {render} from 'react-dom'
import {Provider} from 'react-redux'
import {Tabs} from 'react-tabs'
2016-04-23 06:16:23 +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'
import {initStore} from './redux/initstore';
import {initDB} from './database';
2016-03-16 05:49:42 +00:00
// Don't inject component styles (use our own)
Tabs.setUseDefaultStyles(false);
2016-04-16 23:24:57 +00:00
export const store = createStore();
2016-04-16 23:24:57 +00:00
console.log('-- Loading App --');
2016-04-16 23:24:57 +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
});