Skip to content

Commit

Permalink
Turn all tags unique
Browse files Browse the repository at this point in the history
  • Loading branch information
tubarao312 committed Mar 12, 2024
1 parent 2febd5b commit 472d5ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/graph/analysis_window/header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ const LabelsAndTags: FC<LabelsAndTagsProps> = ({

useEffect(() => {
getCategory({ labels }).then((res) => {
setCategories(res.categories!);
setCategories(Array.from(new Set(res.categories!)));
});
}, [labels]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ const LabelsAndTags: FC<LabelsAndTagsProps> = ({ labels, tags }) => {

useEffect(() => {
getCategory({ labels }).then((res) => {
setCategories(res.categories!);
// Only set unique categories
setCategories(Array.from(new Set(res.categories!)));
});
}, [labels]);

Expand Down

0 comments on commit 472d5ec

Please sign in to comment.