From 0eea0a92db7ce3129d5d3793a10f2b8b7f4d9da5 Mon Sep 17 00:00:00 2001 From: Steven Date: Fri, 28 Jul 2023 22:41:22 +0800 Subject: [PATCH] chore: fix navigator tags --- web/src/components/Navigator.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/web/src/components/Navigator.tsx b/web/src/components/Navigator.tsx index c22b100..329e828 100644 --- a/web/src/components/Navigator.tsx +++ b/web/src/components/Navigator.tsx @@ -1,5 +1,4 @@ import classNames from "classnames"; -import { uniq } from "lodash-es"; import { useAppSelector } from "../stores"; import useViewStore from "../stores/v1/view"; import Icon from "./Icon"; @@ -7,7 +6,7 @@ import Icon from "./Icon"; const Navigator = () => { const viewStore = useViewStore(); const { shortcutList } = useAppSelector((state) => state.shortcut); - const tags = uniq(shortcutList.map((shortcut) => shortcut.tags).flat()); + const tags = shortcutList.map((shortcut) => shortcut.tags).flat(); const currentTab = viewStore.filter.tab || `tab:all`; const sortedTagMap = sortTags(tags); @@ -42,7 +41,7 @@ const Navigator = () => { )} onClick={() => viewStore.setFilter({ tab: `tag:${tag}`, tag: undefined })} > - + {tag} ))}