chore: update en locale (#2109)

This commit is contained in:
boojack
2023-08-08 07:29:29 +08:00
committed by GitHub
parent 8747c58c7d
commit 9693940010
3 changed files with 34 additions and 296 deletions

View File

@ -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={() => {