mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-10 07:48:37 +01:00
new selfhosted version
This commit is contained in:
12
dashboard/utils/truncateText.ts
Normal file
12
dashboard/utils/truncateText.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
|
||||
|
||||
export function truncateText(input: string, maxLength: number) {
|
||||
|
||||
if (input.length > maxLength) {
|
||||
return input.substring(0, maxLength) + '...'
|
||||
}
|
||||
|
||||
return input;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user