get rid of usages of substr which is deprecated
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user