mirror of
https://github.com/strapi/strapi.git
synced 2025-12-12 23:44:08 +00:00
41 lines
788 B
JavaScript
41 lines
788 B
JavaScript
/*
|
|
*
|
|
* Content
|
|
*
|
|
*/
|
|
|
|
import PropTypes from 'prop-types';
|
|
import { connect } from 'react-redux';
|
|
import { createSelector } from 'reselect';
|
|
|
|
import { selectPlugins } from 'containers/App/selectors';
|
|
|
|
import styles from './styles.scss';
|
|
|
|
export class Content extends React.Component { // eslint-disable-line react/prefer-stateless-function
|
|
render() {
|
|
return (
|
|
<div className={styles.content}>
|
|
{React.Children.toArray(this.props.children)}
|
|
</div>
|
|
);
|
|
}
|
|
}
|
|
|
|
Content.propTypes = {
|
|
children: PropTypes.node.isRequired,
|
|
};
|
|
|
|
const mapStateToProps = createSelector(
|
|
selectPlugins(),
|
|
(plugins) => ({ plugins })
|
|
);
|
|
|
|
function mapDispatchToProps(dispatch) {
|
|
return {
|
|
dispatch,
|
|
};
|
|
}
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(Content);
|