-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.jsx
More file actions
31 lines (29 loc) · 1.12 KB
/
App.jsx
File metadata and controls
31 lines (29 loc) · 1.12 KB
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
import React, { PureComponent } from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { Router, Route, IndexRoute, browserHistory } from 'react-router';
import AppStructure from 'components/AppStructure';
import PageNotFound from 'components/PageNotFound';
import AllSurveysContainer from 'containers/AllSurveysContainer';
import LoginContainer from 'containers/LoginContainer';
import SelectedSurveyContainer from 'containers/SelectedSurveyContainer';
import { ALL_SURVEYS_PAGE } from 'constants';
import { store } from 'store';
export default class App extends PureComponent {
render() {
return (
<Provider store={store}>
<Router history={browserHistory}>
<Route path="/" component={AppStructure}>
<IndexRoute component={LoginContainer} />
<Route path={ALL_SURVEYS_PAGE}>
<IndexRoute component={AllSurveysContainer} />
<Route path=":id" component={SelectedSurveyContainer} />
</Route>
<Route path="*" component={PageNotFound} />
</Route>
</Router>
</Provider>
);
}
}