mirror of
https://github.com/strapi/strapi.git
synced 2025-12-28 15:44:59 +00:00
Add no plugins installed yet condition
This commit is contained in:
parent
405c96d0a9
commit
ca2b4d7827
@ -11,7 +11,12 @@ import styles from './styles.scss';
|
||||
class LeftMenuLinkContainer extends React.Component { // eslint-disable-line react/prefer-stateless-function
|
||||
render() {
|
||||
// List of links
|
||||
const links = this.props.plugins.valueSeq().map(plugin => <LeftMenuLink key={plugin.id} icon={plugin.icon || 'ion-merge'} label={plugin.name} destination={`/plugins/${plugin.id}`} isActive={this.props.params.plugin === plugin.id}></LeftMenuLink>);
|
||||
let links = this.props.plugins.valueSeq().map(plugin => <LeftMenuLink key={plugin.id} icon={plugin.icon || 'ion-merge'} label={plugin.name} destination={`/plugins/${plugin.id}`} isActive={this.props.params.plugin === plugin.id}></LeftMenuLink>);
|
||||
|
||||
// Check if the plugins list is empty or not
|
||||
if (!links.size) {
|
||||
links = <span className={styles.noPluginsInstalled}>No plugins installed yet.</span>;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={styles.leftMenuLinkContainer}>
|
||||
|
||||
@ -18,4 +18,11 @@
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin-bottom: 0.9rem;
|
||||
}
|
||||
|
||||
.noPluginsInstalled {
|
||||
color: $white;
|
||||
padding-left: 1.6rem;
|
||||
padding-right: 1.6rem;
|
||||
font-weight: 300;
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user