Created
June 21, 2016 12:25
-
-
Save johnrhampton/aba71f8f210ec3c3b4f6d6efacd8f936 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
import 'babel-polyfill'; | |
import React from 'react'; | |
import {render} from 'react-dom'; | |
import {Provider} from 'react-redux'; | |
import {initializeSockets} from './common/adapters/socket.adapter'; | |
import * as main_store from './common/stores/main.store'; | |
import App from './containers/App'; | |
/** | |
* create Redux store | |
*/ | |
const store = main_store.createStores(); | |
// initialize socket io | |
initializeSockets(store); | |
// Images and icons | |
require.context('./assets/images', true, /.*/); | |
// Vendor JS | |
require('../node_modules/material-design-lite/dist/material.min.js'); | |
// Vendor CSS | |
require('../node_modules/material-design-lite/dist/material.blue_grey-blue.min.css'); | |
// Stylesheets | |
require('./assets/styles/main.scss'); | |
// Material-UI - Needed for onTouchTap, will go away when react 1.0 release | |
// https://github.com/zilverline/react-tap-event-plugin | |
var injectTapEventPlugin = require('react-tap-event-plugin'); | |
injectTapEventPlugin(); | |
if (document.getElementById('leads-app')) { | |
render( | |
<Provider store={store}> | |
<App store={store}/> | |
</Provider>, | |
document.getElementById('leads-app') | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment