54 lines
1.2 KiB
JavaScript
Raw Normal View History

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';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
2017-03-18 17:34:00 +01:00
import { createStructuredSelector } from 'reselect';
import { Switch, Route } from 'react-router-dom';
2017-10-23 16:12:37 +02:00
import { bindActionCreators, compose } from 'redux';
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}>
<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
const withConnect = connect(mapStateToProps, mapDispatchToProps);
export default compose(
withConnect,
)(App);