diff --git a/src/tags/components/TagDisplay.tsx b/src/tags/components/TagDisplay.tsx index 9c9313e0..3425531e 100644 --- a/src/tags/components/TagDisplay.tsx +++ b/src/tags/components/TagDisplay.tsx @@ -31,14 +31,24 @@ const TagDisplay = () => { }) // Flatten all tags into a single array - const flattenedTags = allTags.map((tag) => ({ - id: tag.key, - text: tag.value, - className: "", - })) - - // Optional: Remove duplicates - const uniqueTags = Array.from(new Map(flattenedTags.map((tag) => [tag.id, tag])).values()) + const seenText = new Set() + const uniqueTags = allTags + .map((tag) => ({ + id: tag.key, + text: tag.value.trim(), + className: "", + })) + .filter((tag) => { + const normalized = tag.text.toLowerCase() + if (!normalized) { + return false + } + if (seenText.has(normalized)) { + return false + } + seenText.add(normalized) + return true + }) // Sort tags alphabetically by their text value uniqueTags.sort((a, b) => a.text.localeCompare(b.text)) diff --git a/src/tags/components/TagOverall.tsx b/src/tags/components/TagOverall.tsx index f250539f..193cf15f 100644 --- a/src/tags/components/TagOverall.tsx +++ b/src/tags/components/TagOverall.tsx @@ -81,7 +81,11 @@ export const TagOverall = ({ people, tasks, milestones }: TagOverallProps) => { content="Number of individual contributors" className="z-[1099] ourtooltips" /> - + {numIndividuals === 0 ? ( + No contributors + ) : ( + + )}
@@ -93,7 +97,11 @@ export const TagOverall = ({ people, tasks, milestones }: TagOverallProps) => { content="Number of project teams" className="z-[1099] ourtooltips" /> - + {numTeams === 0 ? ( + No teams + ) : ( + + )}
@@ -108,7 +116,11 @@ export const TagOverall = ({ people, tasks, milestones }: TagOverallProps) => { content="Number of tagged milestones" className="z-[1099] ourtooltips" /> - + {numMilestones === 0 ? ( + No milestones + ) : ( + + )}
@@ -121,7 +133,7 @@ export const TagOverall = ({ people, tasks, milestones }: TagOverallProps) => { className="z-[1099] ourtooltips" /> {tasks.length === 0 ? ( - <>No tasks were found + <>No tasks ) : (
@@ -139,7 +151,7 @@ export const TagOverall = ({ people, tasks, milestones }: TagOverallProps) => { className="z-[1099] ourtooltips" /> {tasks.length === 0 ? ( - <>No tasks were found + <>No tasks ) : (
@@ -158,7 +170,7 @@ export const TagOverall = ({ people, tasks, milestones }: TagOverallProps) => { />
{totalFormAssignments === 0 ? ( - No forms required + No forms ) : (