-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbundleEntry.js
42 lines (35 loc) · 1.12 KB
/
bundleEntry.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import 'babel-polyfill';
import React from 'react';
import ReactDOM from 'react-dom';
import {Router, Route, IndexRoute, browserHistory} from 'react-router';
import injectTapEventPlugin from 'react-tap-event-plugin';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import getMuiTheme from 'material-ui/styles/getMuiTheme';
import App from './app/components/App.jsx';
import Hello from './app/components/hello.jsx';
import Griddle from './app/components/griddle.jsx';
import DashboardList from './app/components/DashboardList.jsx';
global.apiBaseUrl = '';
if (window.location.host === 'localhost:8080') {
global.apiBaseUrl = 'http://localhost:3000'
}
// Needed for onTouchTap
// Check this repo:
// https://github.com/zilverline/react-tap-event-plugin
injectTapEventPlugin();
const routes = (
<Route path="/" component={App}>
<IndexRoute component={Griddle} />
</Route>
);
const Application = () => (
<MuiThemeProvider muiTheme={getMuiTheme()}>
<Router
history={browserHistory}
routes={routes}
/>
</MuiThemeProvider>
);
ReactDOM.render((
<Application />
), document.getElementById('react-root'));