diff options
| author | haappi <74637670+haappi@users.noreply.github.com> | 2025-08-20 03:46:21 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-20 09:46:21 +0100 |
| commit | 2263c0fcd677d9deb68369c463b312a8b6ff4906 (patch) | |
| tree | 9419d51c0f2d8ac50a486f38f4c02cb2ba77727d /apps/browser-extension/src/components | |
| parent | df6814f292f56aa0f650af3d093ba1ca7f159726 (diff) | |
| download | karakeep-2263c0fcd677d9deb68369c463b312a8b6ff4906.tar.zst | |
feat: Render human tags before AI tags (#1740)
Diffstat (limited to 'apps/browser-extension/src/components')
| -rw-r--r-- | apps/browser-extension/src/components/TagList.tsx | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/apps/browser-extension/src/components/TagList.tsx b/apps/browser-extension/src/components/TagList.tsx index 4c5f6dfa..5635a7c2 100644 --- a/apps/browser-extension/src/components/TagList.tsx +++ b/apps/browser-extension/src/components/TagList.tsx @@ -14,16 +14,20 @@ export default function TagList({ bookmarkId }: { bookmarkId: string }) { {bookmark.tags.length === 0 && !isBookmarkStillTagging(bookmark) && ( <Badge variant="secondary">No tags</Badge> )} - {bookmark.tags.map((tag) => ( - <Badge - key={tag.id} - className={ - tag.attachedBy == "ai" ? "bg-purple-500 text-white" : undefined - } - > - {tag.name} - </Badge> - ))} + {[...bookmark.tags] + .sort((a, b) => + a.attachedBy === "ai" ? 1 : b.attachedBy === "ai" ? -1 : 0, + ) + .map((tag) => ( + <Badge + key={tag.id} + className={ + tag.attachedBy === "ai" ? "bg-purple-500 text-white" : undefined + } + > + {tag.name} + </Badge> + ))} {isBookmarkStillTagging(bookmark) && ( <Badge variant="secondary">AI tags loading...</Badge> )} |
