Skip to content

Commit

Permalink
fix: notes section storage
Browse files Browse the repository at this point in the history
  • Loading branch information
nicosh committed Oct 1, 2021
1 parent f2aa9ba commit 6058bef
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/components/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ const Editor = ()=>{
const [notes, setNotes] = useState("")

useEffect(()=>{
let text = "Write something...";
chrome.storage.local.get('notestext', (res) => text = res.notestext || "Write something...");
setNotes(text)
chrome.storage.local.get('notestext', (res) =>{
let txt = res.notestext || "Write something..."
setNotes(txt)
});
},[])

const onChange = (value) => {
Expand Down

0 comments on commit 6058bef

Please sign in to comment.