mirror of
https://github.com/strapi/strapi.git
synced 2025-09-20 05:52:08 +00:00
remove useless console log change leftmenu stateless function to react component
This commit is contained in:
parent
84261bffd7
commit
2cfe18cedb
@ -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;
|
||||
|
@ -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;
|
@ -0,0 +1,3 @@
|
||||
.pluginLeftMenuSection { /* stylelint-disable */
|
||||
|
||||
}
|
@ -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);
|
||||
});
|
||||
});
|
@ -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,
|
||||
};
|
||||
|
||||
|
@ -10,7 +10,7 @@ import {
|
||||
} from './constants';
|
||||
|
||||
const initialState = fromJS({
|
||||
sections: List()
|
||||
sections: List(),
|
||||
});
|
||||
|
||||
function appReducer(state = initialState, action) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user