(fix:settings) truncate long doc names

This commit is contained in:
ManishMadan2882
2024-11-27 16:54:05 +05:30
parent 4ab12663be
commit bfeae3a95b
2 changed files with 25 additions and 13 deletions

View File

@@ -0,0 +1,4 @@
export function truncate(str: string, n: number) {
// slices long strings and ends with ...
return str.length > n ? str.slice(0, n - 1) + '...' : str;
}