mirror of
https://github.com/strapi/strapi.git
synced 2025-09-20 14:00:48 +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 PluginLeftMenuHeader from 'components/PluginLeftMenuHeader';
|
||||||
import styles from './styles.scss';
|
import styles from './styles.scss';
|
||||||
|
|
||||||
function PluginLeftMenu() {
|
class PluginLeftMenu extends React.Component { // eslint-disable-line react/prefer-stateless-function
|
||||||
return (
|
constructor(props) {
|
||||||
<div className={`${styles.pluginLeftMenu} col-md-3`}>
|
super(props);
|
||||||
<PluginLeftMenuHeader />
|
}
|
||||||
</div>
|
|
||||||
);
|
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;
|
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,
|
exposedComponents: this.props.exposedComponents,
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
console.log(this.props.app)
|
|
||||||
return (
|
return (
|
||||||
<div className={`${pluginId} ${styles.app}`}>
|
<div className={`${pluginId} ${styles.app}`}>
|
||||||
<div className={styles.baseline}></div>
|
<div className={styles.baseline}></div>
|
||||||
<div className="container-fluid">
|
<div className="container-fluid">
|
||||||
<div className="row">
|
<div className="row">
|
||||||
<PluginLeftMenu />
|
<PluginLeftMenu sections={this.props.app.sections} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{React.Children.toArray(content)}
|
{React.Children.toArray(content)}
|
||||||
@ -61,7 +60,7 @@ App.contextTypes = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
App.propTypes = {
|
App.propTypes = {
|
||||||
children: React.PropTypes.node.isRequired,
|
children: React.PropTypes.node,
|
||||||
exposedComponents: React.PropTypes.object.isRequired,
|
exposedComponents: React.PropTypes.object.isRequired,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ import {
|
|||||||
} from './constants';
|
} from './constants';
|
||||||
|
|
||||||
const initialState = fromJS({
|
const initialState = fromJS({
|
||||||
sections: List()
|
sections: List(),
|
||||||
});
|
});
|
||||||
|
|
||||||
function appReducer(state = initialState, action) {
|
function appReducer(state = initialState, action) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user