fix: limit the shown text's length (close #80)
This commit is contained in:
1 parent
fa2bac9a9e
commit
e07eb017f7
3 files changed
+30
-8
No files matched your search
@@ -0,0 +1,6 @@
|
||||
export function renderText(text, limit) {
|
||||
if (text.length > limit) {
|
||||
return text.slice(0, limit - 3) + '...';
|
||||
}
|
||||
return text;
|
||||
}
|
||||
Reference in new issue
Block a user