fix: after truncating add '...'

This commit is contained in:
abdou6666 2024-12-02 17:19:06 +01:00
parent cdcfc2663d
commit 126e2494d4

View File

@ -7,5 +7,5 @@
*/ */
export const truncate = (text: string, length = 300) => { export const truncate = (text: string, length = 300) => {
return text.length > length ? text.substring(0, length) : text; return text.length > length ? text.substring(0, length) + "..." : text;
}; };