Skip to content

Commit 91e6c48

Browse files
committed
add atom for textEditorInput
1 parent bc01454 commit 91e6c48

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

client/src/App.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,6 @@ function App() {
214214
{eraserMode && <EraserCursor></EraserCursor>}
215215
{showMenu && <Menu></Menu>}
216216
{textEditor && <TextEditor></TextEditor>}
217-
{console.log(text)}
218217
</div>
219218
);
220219
}

client/src/components/TextEditor.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { useSetRecoilState, useRecoilValue, useRecoilState } from "recoil";
2-
import { showTextEditor, docState, textState, textEditorInput } from "../atoms";
2+
import { showTextEditor, docState, textEditorInput } from "../atoms";
33

44
function TextEditor() {
55
const setTextEditorFalse = useSetRecoilState(showTextEditor);
66
const doc = useRecoilValue(docState);
7-
const text = useRecoilValue(textState);
7+
const text = useRecoilValue(textEditorInput);
88
const [input, setInput] = useRecoilState(textEditorInput)
99

1010
function removeTextEditor() {

0 commit comments

Comments
 (0)