-
Notifications
You must be signed in to change notification settings - Fork 1
/
Main.js
executable file
·31 lines (28 loc) · 1.14 KB
/
Main.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
global.jQuery = require("jquery");
global.GEPPETTO_CONFIGURATION = require('./GeppettoConfiguration.json');
const Provider = require("react-redux").Provider;
const configureStore = require('./store').default;
const store = configureStore();
jQuery(function () {
require('@geppettoengine/geppetto-client-initialization');
var React = require('react');
var ReactDOM = require('react-dom');
var Route = require('react-router-dom').Route;
var Switch = require('react-router-dom').Switch;
var Redirect = require('react-router-dom').Redirect;
var Router = require('react-router-dom').BrowserRouter;
var VFBMain = require('./containers/VFBMainContainer').default;
var ErrorCatcher = require('./components/interface/ErrorCatcher').default;
ReactDOM.render(
<ErrorCatcher>
<Provider store={store}>
<Router basename={GEPPETTO_CONFIGURATION.contextPath}>
<Switch>
<Route path="/geppetto" component={props => <VFBMain {...props} />} />
<Redirect from="/" to="/geppetto" />
</Switch>
</Router>
</Provider>
</ErrorCatcher>
, document.getElementById('mainContainer'));
});