2017-01-17 13:40:59 +01:00
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* This component is the skeleton around the actual pages, and should only
|
|
|
|
|
* contain code that should be seen on all pages. (e.g. navigation bar)
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
import React from 'react';
|
2017-09-20 11:12:04 +02:00
|
|
|
import PropTypes from 'prop-types';
|
2017-05-11 14:17:21 +02:00
|
|
|
import { connect } from 'react-redux';
|
2017-03-18 17:34:00 +01:00
|
|
|
import { createStructuredSelector } from 'reselect';
|
2017-08-22 17:57:54 +02:00
|
|
|
import { Switch, Route } from 'react-router-dom';
|
2017-10-23 16:12:37 +02:00
|
|
|
import { bindActionCreators, compose } from 'redux';
|
2017-08-22 17:57:54 +02:00
|
|
|
|
|
|
|
|
import HomePage from 'containers/HomePage';
|
|
|
|
|
|
2017-06-08 17:16:20 +01:00
|
|
|
import { pluginId } from 'app';
|
2017-01-17 13:40:59 +01:00
|
|
|
|
2017-05-11 10:54:44 +02:00
|
|
|
class App extends React.Component {
|
2017-01-17 13:40:59 +01:00
|
|
|
render() {
|
|
|
|
|
return (
|
2017-06-08 17:16:20 +01:00
|
|
|
<div className={pluginId}>
|
2017-08-22 17:57:54 +02:00
|
|
|
<Switch>
|
|
|
|
|
<Route path="" component={HomePage} exact />
|
|
|
|
|
</Switch>
|
2017-03-18 17:34:00 +01:00
|
|
|
</div>
|
2017-01-17 13:40:59 +01:00
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
2017-03-18 17:34:00 +01:00
|
|
|
|
2017-10-23 16:12:37 +02:00
|
|
|
App.contextTypes = {
|
|
|
|
|
plugins: PropTypes.object,
|
|
|
|
|
router: PropTypes.object.isRequired,
|
|
|
|
|
updatePlugin: PropTypes.func,
|
2017-03-18 17:34:00 +01:00
|
|
|
};
|
|
|
|
|
|
2017-10-23 16:12:37 +02:00
|
|
|
App.propTypes = {};
|
|
|
|
|
|
2017-03-18 17:34:00 +01:00
|
|
|
export function mapDispatchToProps(dispatch) {
|
2017-10-23 16:12:37 +02:00
|
|
|
return bindActionCreators(
|
|
|
|
|
{},
|
2017-03-18 17:34:00 +01:00
|
|
|
dispatch,
|
2017-10-23 16:12:37 +02:00
|
|
|
);
|
2017-03-18 17:34:00 +01:00
|
|
|
}
|
|
|
|
|
|
2017-06-08 17:16:20 +01:00
|
|
|
const mapStateToProps = createStructuredSelector({});
|
2017-03-18 17:34:00 +01:00
|
|
|
|
|
|
|
|
// Wrap the component to inject dispatch and state into it
|
2017-08-22 17:57:54 +02:00
|
|
|
const withConnect = connect(mapStateToProps, mapDispatchToProps);
|
|
|
|
|
|
|
|
|
|
export default compose(
|
|
|
|
|
withConnect,
|
2017-09-20 11:12:04 +02:00
|
|
|
)(App);
|