chore: use shortcut v2 api

This commit is contained in:
Steven
2023-11-21 23:33:34 +08:00
parent c449669793
commit 61b167ef66
32 changed files with 515 additions and 724 deletions

View File

@ -1,13 +1,13 @@
import classNames from "classnames";
import { useTranslation } from "react-i18next";
import { useAppSelector } from "../stores";
import useShortcutStore from "@/stores/v1/shortcut";
import useViewStore from "../stores/v1/view";
import Icon from "./Icon";
const ShortcutsNavigator = () => {
const { t } = useTranslation();
const viewStore = useViewStore();
const { shortcutList } = useAppSelector((state) => state.shortcut);
const shortcutList = useShortcutStore().getShortcutList();
const tags = shortcutList.map((shortcut) => shortcut.tags).flat();
const currentTab = viewStore.filter.tab || `tab:all`;
const sortedTagMap = sortTags(tags);