diff --git a/web/src/components/MemoEditor/ActionButton/TagSelector.tsx b/web/src/components/MemoEditor/ActionButton/TagSelector.tsx index 72e5a60b..f9cbbd97 100644 --- a/web/src/components/MemoEditor/ActionButton/TagSelector.tsx +++ b/web/src/components/MemoEditor/ActionButton/TagSelector.tsx @@ -1,4 +1,5 @@ import { IconButton } from "@mui/joy"; +import { useEffect } from "react"; import Icon from "@/components/Icon"; import OverflowTip from "@/components/kit/OverflowTip"; import { useTagStore } from "@/store/module"; @@ -12,6 +13,16 @@ const TagSelector = (props: Props) => { const tagStore = useTagStore(); const tags = tagStore.state.tags; + useEffect(() => { + (async () => { + try { + await tagStore.fetchTags(); + } catch (error) { + // do nothing. + } + })(); + }, []); + return (