create note on click if does not exist

This commit is contained in:
2023-05-17 03:47:48 +02:00
parent add3e944f6
commit 8774d74163
2 changed files with 6 additions and 3 deletions

View File

@@ -104,6 +104,7 @@ export const addNote = (title: string, content: string, goToNote: boolean = fals
}
baseNotes[id] = newNote
if (goToNote) setActiveNote(id)
return newNote
}
export const deleteNote = (noteId: string) => {