chore: update store selector

This commit is contained in:
boojack
2022-05-22 12:41:15 +08:00
parent 948b53393a
commit 2e5b120986
15 changed files with 79 additions and 75 deletions

View File

@ -43,10 +43,8 @@ const getCursorPostion = (input: HTMLTextAreaElement) => {
interface Props {}
const MemoEditor: React.FC<Props> = () => {
const {
editor: editorState,
memo: { tags },
} = useAppSelector((state) => state);
const editorState = useAppSelector((state) => state.editor);
const tags = useAppSelector((state) => state.memo.tags);
const [isTagSeletorShown, toggleTagSeletor] = useToggle(false);
const editorRef = useRef<EditorRefActions>(null);
const prevGlobalStateRef = useRef(editorState);