mirror of
https://github.com/Unleash/unleash.git
synced 2025-05-31 01:16:01 +02:00
fix(ApplicationList): icon can be null and default values will not kick in then.
This commit is contained in:
parent
ef120cf2d1
commit
791aed23b5
@ -11,10 +11,10 @@ export const shorten = (str, len = 50) => (str && str.length > len ? `${str.subs
|
||||
export const AppsLinkList = ({ apps }) => (
|
||||
<List>
|
||||
{apps.length > 0 &&
|
||||
apps.map(({ appName, description = '-', icon = 'apps' }) => (
|
||||
apps.map(({ appName, description = '-', icon }) => (
|
||||
<ListItem twoLine key={appName}>
|
||||
<span className="mdl-list__item-primary-content" style={{ minWidth: 0 }}>
|
||||
<Icon name={icon} className="mdl-list__item-avatar" />
|
||||
<Icon name={icon || 'apps'} className="mdl-list__item-avatar" />
|
||||
<Link to={`/applications/${appName}`} className={[styles.listLink, styles.truncate].join(' ')}>
|
||||
{appName}
|
||||
<span className={['mdl-list__item-sub-title', styles.truncate].join(' ')}>
|
||||
|
Loading…
Reference in New Issue
Block a user