From 7a5c933fe9f9f07a249f8433bc7352528d221016 Mon Sep 17 00:00:00 2001 From: Parth Virendrakumar Shah Date: Wed, 7 Aug 2024 10:07:58 -0700 Subject: [PATCH] modified the placeholder string --- frontend/src/pages/Posts.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/pages/Posts.tsx b/frontend/src/pages/Posts.tsx index 4c14f24..82977d4 100644 --- a/frontend/src/pages/Posts.tsx +++ b/frontend/src/pages/Posts.tsx @@ -36,9 +36,9 @@ const Posts = () => { const filteredPosts = posts; const allTags = filteredPosts.map(post => post.tags).flat(); const uniqueTags = [...new Set(allTags)]; - const tagsToDisplay = uniqueTags.slice(0, 5); - const placeholderTags = tagsToDisplay.length > 0 ? tagsToDisplay.join(", ") : ""; - + const tagsToDisplay = uniqueTags.slice(0, 3); + var placeholderTags = tagsToDisplay.length > 0 ? tagsToDisplay.join(", ") : ""; + placeholderTags = placeholderTags + (uniqueTags.length > 3 ? " ..." : ""); useEffect(() => { const handleClickOutside = (event: MouseEvent) => { if (filterRef.current && !filterRef.current.contains(event.target as Node)) {