mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
chore: update en locale (#2109)
This commit is contained in:
@ -1,7 +1,6 @@
|
||||
import { useEffect } from "react";
|
||||
import { useLocation } from "react-router-dom";
|
||||
import { getDateString } from "@/helpers/datetime";
|
||||
import { getTextWithMemoType } from "@/helpers/filter";
|
||||
import { useFilterStore } from "@/store/module";
|
||||
import { useTranslate } from "@/utils/i18n";
|
||||
import Icon from "./Icon";
|
||||
@ -12,8 +11,8 @@ const MemoFilter = () => {
|
||||
const location = useLocation();
|
||||
const filterStore = useFilterStore();
|
||||
const filter = filterStore.state;
|
||||
const { tag: tagQuery, duration, type: memoType, text: textQuery, visibility } = filter;
|
||||
const showFilter = Boolean(tagQuery || (duration && duration.from < duration.to) || memoType || textQuery || visibility);
|
||||
const { tag: tagQuery, duration, text: textQuery, visibility } = filter;
|
||||
const showFilter = Boolean(tagQuery || (duration && duration.from < duration.to) || textQuery || visibility);
|
||||
|
||||
useEffect(() => {
|
||||
filterStore.clearFilter();
|
||||
@ -31,16 +30,6 @@ const MemoFilter = () => {
|
||||
<Icon.Tag className="icon-text" /> {tagQuery}
|
||||
<Icon.X className="w-4 h-auto ml-1 opacity-40" />
|
||||
</div>
|
||||
<div
|
||||
className={"filter-item-container " + (memoType ? "" : "!hidden")}
|
||||
onClick={() => {
|
||||
filterStore.setMemoTypeFilter(undefined);
|
||||
}}
|
||||
>
|
||||
<Icon.Box className="icon-text" />{" "}
|
||||
{t(getTextWithMemoType(memoType as MemoSpecType) as Exclude<ReturnType<typeof getTextWithMemoType>, "">)}
|
||||
<Icon.X className="w-4 h-auto ml-1 opacity-40" />
|
||||
</div>
|
||||
<div
|
||||
className={"filter-item-container " + (visibility ? "" : "!hidden")}
|
||||
onClick={() => {
|
||||
|
Reference in New Issue
Block a user