diff --git a/frontend/src/component/application/application-edit-component.js b/frontend/src/component/application/application-edit-component.js index b4287dd09b..53e0b73c63 100644 --- a/frontend/src/component/application/application-edit-component.js +++ b/frontend/src/component/application/application-edit-component.js @@ -15,7 +15,9 @@ class StatefulTextfield extends Component { } render () { - return ( (str && str.length > len ? `${str.substring(0, len)}...` : str); + export const AppsLinkList = ({ apps }) => ( {apps.length > 0 && apps.map(({ appName, description = '-', icon = 'apps' }) => ( - + {appName} diff --git a/frontend/src/component/feature/feature-list-item-component.jsx b/frontend/src/component/feature/feature-list-item-component.jsx index dd8f9f69f6..4273601693 100644 --- a/frontend/src/component/feature/feature-list-item-component.jsx +++ b/frontend/src/component/feature/feature-list-item-component.jsx @@ -3,6 +3,7 @@ import { Link } from 'react-router'; import { Chip, Switch, Icon, IconButton } from 'react-mdl'; import percentLib from 'percent'; import Progress from './progress'; +import { shorten } from '../common'; import style from './feature.scss'; @@ -41,7 +42,7 @@ const Feature = ({ onFeatureClick(feature)} checked={enabled} /> - {name} {(description && description.substring(0, 30)) || ''} + {name} {shorten(description, 30) || ''}