Skip to content

Commit

Permalink
modified the placeholder string
Browse files Browse the repository at this point in the history
  • Loading branch information
Parth18Shah committed Aug 7, 2024
1 parent 16cbc0e commit 7a5c933
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions frontend/src/pages/Posts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 7a5c933

Please sign in to comment.