Merge pull request #15898 from backstage/freben/substr

🧹  get rid of usages of substr which is deprecated
This commit is contained in:
Fredrik Adelöw
2023-01-26 13:29:56 +01:00
committed by GitHub
18 changed files with 37 additions and 21 deletions
@@ -22,7 +22,7 @@ import { BackstageTheme } from '@backstage/theme';
import { Link } from '@backstage/core-components';
function stripText(text: string, maxLength: number) {
return text.length > maxLength ? `${text.substr(0, maxLength)}...` : text;
return text.length > maxLength ? `${text.slice(0, maxLength)}...` : text;
}
const useStyles = makeStyles<BackstageTheme>(theme => ({
root: {