mirror of
https://github.com/Unleash/unleash.git
synced 2025-06-04 01:18:20 +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 }) => (
|
export const AppsLinkList = ({ apps }) => (
|
||||||
<List>
|
<List>
|
||||||
{apps.length > 0 &&
|
{apps.length > 0 &&
|
||||||
apps.map(({ appName, description = '-', icon = 'apps' }) => (
|
apps.map(({ appName, description = '-', icon }) => (
|
||||||
<ListItem twoLine key={appName}>
|
<ListItem twoLine key={appName}>
|
||||||
<span className="mdl-list__item-primary-content" style={{ minWidth: 0 }}>
|
<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(' ')}>
|
<Link to={`/applications/${appName}`} className={[styles.listLink, styles.truncate].join(' ')}>
|
||||||
{appName}
|
{appName}
|
||||||
<span className={['mdl-list__item-sub-title', styles.truncate].join(' ')}>
|
<span className={['mdl-list__item-sub-title', styles.truncate].join(' ')}>
|
||||||
|
Loading…
Reference in New Issue
Block a user