Skip to content

armgit / memos

Public Imported from GitHub
0

Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.

fix: fetch tags in memo editor (#2131)

boojackdd529f845a61
diff --git a/web/src/components/MemoEditor/MemoEditorDialog.tsx b/web/src/components/MemoEditor/MemoEditorDialog.tsx
index 8eae02edd..50bb7f07e 100644
--- a/web/src/components/MemoEditor/MemoEditorDialog.tsx
+++ b/web/src/components/MemoEditor/MemoEditorDialog.tsx
@@ -1,3 +1,5 @@
+import { useEffect } from "react";
+import { useTagStore } from "@/store/module";
import { useTranslate } from "@/utils/i18n";
import MemoEditor from ".";
import { generateDialog } from "../Dialog";
@@ -9,10 +11,16 @@ interface Props extends DialogProps {
}
const MemoEditorDialog: React.FC<Props> = ({ memoId, relationList, destroy }: Props) => {
+ const t = useTranslate();
+ const tagStore = useTagStore();
+
+ useEffect(() => {
+ tagStore.fetchTags();
+ }, []);
+
const handleCloseBtnClick = () => {
destroy();
};
- const t = useTranslate();
return (
<>