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 { Provider } from 'react-redux';
|
|
|
|
import { store } from '../../app';
|
|
|
|
|
|
|
|
import '../../styles/main.scss';
|
|
|
|
|
|
|
|
export default class App extends React.Component { // eslint-disable-line react/prefer-stateless-function
|
|
|
|
render() {
|
2017-01-20 16:22:57 +01:00
|
|
|
// Assign plugin component to children
|
|
|
|
const childrenWithProps = React.Children.map(this.props.children,
|
|
|
|
(child) => React.cloneElement(child, {
|
2017-03-15 11:48:56 +01:00
|
|
|
exposedComponents: this.props.exposedComponents
|
2017-01-20 16:22:57 +01:00
|
|
|
})
|
|
|
|
);
|
|
|
|
|
2017-01-17 13:40:59 +01:00
|
|
|
return (
|
|
|
|
<Provider store={store}>
|
2017-01-20 11:38:48 +01:00
|
|
|
<div className='content-manager'>
|
2017-01-20 16:22:57 +01:00
|
|
|
{React.Children.toArray(childrenWithProps)}
|
2017-01-17 13:40:59 +01:00
|
|
|
</div>
|
|
|
|
</Provider>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|