diff --git a/app/components/filtered-search-bar/Card.js b/app/components/filtered-search-bar/Card.js index b32209cb..4f20303a 100644 --- a/app/components/filtered-search-bar/Card.js +++ b/app/components/filtered-search-bar/Card.js @@ -6,13 +6,25 @@ function Card({ name, value, info, type }) { window.open(url, "_blank", "noopener,noreferrer"); }; + function TrimName(name) { + if (name.length > 130) { + let name1 = name.slice(0, 130); + while (name1.charAt(name1.length - 1) !== " " && name1.length !== 0) { + name1 = name1.slice(0, -1); + } + return name1 + "..."; + } else { + return name + "..."; + } + } + return (
{name}

- {info} + {TrimName(info)}