-
{tag}
- {amount > 1 &&
({amount})}
+
+
+ {t("common.tags")}
+ {tagAmounts.length > 0 && ({tagAmounts.length})}
+ {tagAmounts.length > 0 ? (
+
+ {tagAmounts.map(([tag, amount]) => (
+
+
+
+
+
+
+
+
+
+
+
handleTagClick(tag)}
+ >
+ {tag}
+ {amount > 1 && ({amount})}
+
+
+ ))}
+
+ ) : (
+ !props.readonly && (
+
+
+
{t("tag.create-tags-guide")}
+
+ )
+ )}
);
};
diff --git a/web/src/components/MemoFilter.tsx b/web/src/components/MemoFilter.tsx
deleted file mode 100644
index bcbf2f509..000000000
--- a/web/src/components/MemoFilter.tsx
+++ /dev/null
@@ -1,75 +0,0 @@
-import clsx from "clsx";
-import { useEffect } from "react";
-import { useLocation } from "react-router-dom";
-import { useFilterStore } from "@/store/module";
-import { useTranslate } from "@/utils/i18n";
-import Icon from "./Icon";
-
-interface Props {
- className?: string;
-}
-
-const MemoFilter = (props: Props) => {
- const t = useTranslate();
- const location = useLocation();
- const filterStore = useFilterStore();
- const filter = filterStore.state;
- const showFilter = Boolean(filter.tag || filter.text || filter.visibility);
-
- useEffect(() => {
- filterStore.clearFilter();
- }, [location]);
-
- if (!showFilter) {
- return null;
- }
-
- return (
-
-
-
- {t("common.filter")}:
-
- {filter.tag && (
-
{
- filterStore.setTagFilter(undefined);
- }}
- >
- {filter.tag}
-
-
- )}
- {filter.visibility && (
-
{
- filterStore.setMemoVisibilityFilter(undefined);
- }}
- >
- {filter.visibility}
-
-
- )}
- {filter.text && (
-
{
- filterStore.setTextFilter(undefined);
- }}
- >
- {filter.text}
-
-
- )}
-
- );
-};
-
-export default MemoFilter;
diff --git a/web/src/pages/Archived.tsx b/web/src/pages/Archived.tsx
index ef9f76c42..1477b43b3 100644
--- a/web/src/pages/Archived.tsx
+++ b/web/src/pages/Archived.tsx
@@ -6,7 +6,6 @@ import { showCommonDialog } from "@/components/Dialog/CommonDialog";
import Empty from "@/components/Empty";
import Icon from "@/components/Icon";
import MemoContent from "@/components/MemoContent";
-import MemoFilter from "@/components/MemoFilter";
import MobileHeader from "@/components/MobileHeader";
import SearchBar from "@/components/SearchBar";
import { DEFAULT_LIST_MEMOS_PAGE_SIZE } from "@/helpers/consts";
@@ -99,7 +98,6 @@ const Archived = () => {