remove useless console log change leftmenu stateless function to react component

This commit is contained in:
cyril lopez 2017-07-12 16:18:58 +02:00
parent 84261bffd7
commit 2cfe18cedb
6 changed files with 59 additions and 10 deletions

View File

@ -9,12 +9,28 @@ import React from 'react';
import PluginLeftMenuHeader from 'components/PluginLeftMenuHeader';
import styles from './styles.scss';
function PluginLeftMenu() {
return (
<div className={`${styles.pluginLeftMenu} col-md-3`}>
<PluginLeftMenuHeader />
</div>
);
class PluginLeftMenu extends React.Component { // eslint-disable-line react/prefer-stateless-function
constructor(props) {
super(props);
}
render() {
return (
<div className={`${styles.pluginLeftMenu} col-md-3`}>
<PluginLeftMenuHeader />
</div>
);
}
}
// function PluginLeftMenu() {
// return (
// <div className={`${styles.pluginLeftMenu} col-md-3`}>
// <PluginLeftMenuHeader />
// </div>
// );
// }
export default PluginLeftMenu;

View File

@ -0,0 +1,20 @@
/**
*
* PluginLeftMenuSection
*
*/
import React from 'react';
import styles from './styles.scss';
class PluginLeftMenuSection extends React.Component { // eslint-disable-line react/prefer-stateless-function
render() {
return (
<div className={styles.pluginLeftMenuSection}>
</div>
);
}
}
export default PluginLeftMenuSection;

View File

@ -0,0 +1,3 @@
.pluginLeftMenuSection { /* stylelint-disable */
}

View File

@ -0,0 +1,11 @@
// import PluginLeftMenuSection from '../index';
import expect from 'expect';
// import { shallow } from 'enzyme';
// import React from 'react';
describe('<PluginLeftMenuSection />', () => {
it('Expect to have unit tests specified', () => {
expect(true).toEqual(false);
});
});

View File

@ -41,13 +41,12 @@ class App extends React.Component {
exposedComponents: this.props.exposedComponents,
})
);
console.log(this.props.app)
return (
<div className={`${pluginId} ${styles.app}`}>
<div className={styles.baseline}></div>
<div className="container-fluid">
<div className="row">
<PluginLeftMenu />
<PluginLeftMenu sections={this.props.app.sections} />
</div>
</div>
{React.Children.toArray(content)}
@ -61,7 +60,7 @@ App.contextTypes = {
};
App.propTypes = {
children: React.PropTypes.node.isRequired,
children: React.PropTypes.node,
exposedComponents: React.PropTypes.object.isRequired,
};

View File

@ -10,7 +10,7 @@ import {
} from './constants';
const initialState = fromJS({
sections: List()
sections: List(),
});
function appReducer(state = initialState, action) {