fix: fetch tags in memo editor (#2131)

fix: fetch tag
This commit is contained in:
boojack 2023-08-13 23:27:01 +08:00 committed by GitHub
parent 9f8a0a8dd3
commit dd529f845a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 (
<>