From 28f95b9372cebf45901ddfe676de2d397ed41acb Mon Sep 17 00:00:00 2001 From: kyle-ssg Date: Tue, 5 Nov 2024 15:26:27 +0000 Subject: [PATCH] Fix permanent tag icons --- frontend/web/components/tags/TagContent.tsx | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/frontend/web/components/tags/TagContent.tsx b/frontend/web/components/tags/TagContent.tsx index 106b56a25568..44690908d358 100644 --- a/frontend/web/components/tags/TagContent.tsx +++ b/frontend/web/components/tags/TagContent.tsx @@ -20,7 +20,13 @@ function escapeHTML(unsafe: string) { ) } -const renderIcon = (tagType: string, tagColor: string, tagLabel: string) => { +const renderIcon = ( + tagType: string, + tagColor: string, + tagLabel: string, + isPermanent: boolean, +) => { + console.log(tagType, tagLabel) switch (tagType) { case 'STALE': return ( @@ -48,13 +54,13 @@ const renderIcon = (tagType: string, tagColor: string, tagLabel: string) => { return } default: - return ( + return isPermanent ? ( - ) + ) : null } } @@ -125,7 +131,7 @@ const TagContent: FC = ({ tag }) => { })} > {tagLabel} - {renderIcon(tag.type!, tag.color!, tag.label!)} + {renderIcon(tag.type!, tag.color!, tag.label!, tag.is_permanent)} } >