mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
chore: code clean
This commit is contained in:
@ -5,10 +5,9 @@ import { toast } from "react-hot-toast";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import useLocalStorage from "react-use/lib/useLocalStorage";
|
||||
import { TAB_SPACE_WIDTH, UNKNOWN_ID, VISIBILITY_SELECTOR_ITEMS } from "@/helpers/consts";
|
||||
import { clearContentQueryParam } from "@/helpers/utils";
|
||||
import useCurrentUser from "@/hooks/useCurrentUser";
|
||||
import { getMatchedNodes } from "@/labs/marked";
|
||||
import { useFilterStore, useGlobalStore, useMemoStore, useResourceStore, useTagStore } from "@/store/module";
|
||||
import { useGlobalStore, useMemoStore, useResourceStore, useTagStore } from "@/store/module";
|
||||
import { useUserV1Store } from "@/store/v1";
|
||||
import { Resource } from "@/types/proto/api/v2/resource_service";
|
||||
import { UserSetting, User_Role } from "@/types/proto/api/v2/user_service";
|
||||
@ -52,7 +51,6 @@ const MemoEditor = (props: Props) => {
|
||||
state: { systemStatus },
|
||||
} = useGlobalStore();
|
||||
const userV1Store = useUserV1Store();
|
||||
const filterStore = useFilterStore();
|
||||
const memoStore = useMemoStore();
|
||||
const tagStore = useTagStore();
|
||||
const resourceStore = useResourceStore();
|
||||
@ -324,10 +322,8 @@ const MemoEditor = (props: Props) => {
|
||||
resourceIdList: state.resourceList.map((resource) => resource.id),
|
||||
relationList: state.relationList,
|
||||
});
|
||||
filterStore.clearFilter();
|
||||
}
|
||||
editorRef.current?.setContent("");
|
||||
clearContentQueryParam();
|
||||
} catch (error: any) {
|
||||
console.error(error);
|
||||
toast.error(error.response.data.message);
|
||||
|
Reference in New Issue
Block a user