chore: update explore header style (#1137)

This commit is contained in:
boojack
2023-02-22 19:21:08 +08:00
committed by GitHub
parent d1b307b18f
commit 42d849abfc
6 changed files with 36 additions and 46 deletions

View File

@ -257,15 +257,6 @@ const MemoEditor = () => {
}
};
const scrollToEditingMemo = useCallback(() => {
if (editorState.editMemoId) {
const memoElements = document.getElementsByClassName(`memos-${editorState.editMemoId}`);
if (memoElements.length !== 0) {
memoElements[0].scrollIntoView({ behavior: "smooth" });
}
}
}, [editorState.editMemoId]);
const handleSaveBtnClick = async () => {
if (state.isRequesting) {
return;
@ -327,7 +318,6 @@ const MemoEditor = () => {
editorStore.clearResourceList();
setEditorContentCache("");
editorRef.current?.setContent("");
scrollToEditingMemo();
};
const handleCancelEdit = () => {
@ -336,7 +326,6 @@ const MemoEditor = () => {
editorStore.clearResourceList();
editorRef.current?.setContent("");
setEditorContentCache("");
scrollToEditingMemo();
}
};