mirror of
https://github.com/strapi/strapi.git
synced 2025-11-09 22:59:14 +00:00
Delete role collapse chevron if no API
This commit is contained in:
parent
78c2b252cd
commit
f12927d2ce
@ -47,6 +47,7 @@ class Plugin extends React.Component { // eslint-disable-line react/prefer-state
|
|||||||
render() {
|
render() {
|
||||||
const divStyle = this.state.collapse ? { marginBottom: '.4rem' } : {};
|
const divStyle = this.state.collapse ? { marginBottom: '.4rem' } : {};
|
||||||
const icon = get(this.context.plugins.toJS(), [this.props.name, 'icon']);
|
const icon = get(this.context.plugins.toJS(), [this.props.name, 'icon']);
|
||||||
|
const emptyApplication = !isEmpty(get(this.props.plugin, 'controllers'));
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.plugin} style={divStyle}>
|
<div className={styles.plugin} style={divStyle}>
|
||||||
@ -72,8 +73,9 @@ class Plugin extends React.Component { // eslint-disable-line react/prefer-state
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className={this.state.collapse ? styles.chevronUp : styles.chevronDown}>
|
{ emptyApplication ? (
|
||||||
</div>
|
<div className={this.state.collapse ? styles.chevronUp : styles.chevronDown}></div>
|
||||||
|
) : '' }
|
||||||
</div>
|
</div>
|
||||||
<Collapse isOpen={this.state.collapse}>
|
<Collapse isOpen={this.state.collapse}>
|
||||||
<div />
|
<div />
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user