fix: limit the shown text's length (close #80)
This commit is contained in:
@@ -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