From 48706e79ebde723cd8646fc80ecd64450f42bd28 Mon Sep 17 00:00:00 2001 From: ditiqi Date: Thu, 6 Mar 2025 22:34:18 +0800 Subject: [PATCH] add --- .../src/app/main/path/components/TermInfo.tsx | 40 +++++++++++-------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/apps/web/src/app/main/path/components/TermInfo.tsx b/apps/web/src/app/main/path/components/TermInfo.tsx index b26f721..21fed6d 100755 --- a/apps/web/src/app/main/path/components/TermInfo.tsx +++ b/apps/web/src/app/main/path/components/TermInfo.tsx @@ -6,24 +6,30 @@ const TermInfo = ({ terms = [] }: { terms?: TermDto[] }) => {
{terms && terms?.length > 0 ? (
- {terms?.map((term: any) => { - return ( - + String(a?.taxonomy?.id || "").localeCompare( + String(b?.taxonomy?.id || "") + ) + ) + ?.map((term: any) => { + return ( + - {term.name} - - ); - })} + ? "green" + : term?.taxonomy?.slug === + TaxonomySlug.LEVEL + ? "blue" + : "orange" + } + className="px-3 py-1 rounded-full border-0"> + {term.name} + + ); + })}
) : (