A função truncada reage
const truncate = (str, n) => {
return str?.length > n ? str.substr(0, n - 1) + "..." : str;
};
Runtime Terror
const truncate = (str, n) => {
return str?.length > n ? str.substr(0, n - 1) + "..." : str;
};