mirror of
https://github.com/artegoser/AnoPaper.git
synced 2024-11-24 21:06:21 +03:00
fix: update text after save in note edit
This commit is contained in:
parent
cdbf75a332
commit
cbc1e65fa1
1 changed files with 5 additions and 5 deletions
|
@ -97,15 +97,15 @@ function NotePage() {
|
|||
text={edit ? locals.Save : locals.Edit}
|
||||
icon={edit ? ArchiveBoxArrowDownIcon : PencilIcon}
|
||||
onClick={() => {
|
||||
if (settings.CollabEdit === true) {
|
||||
textUpdate(notes[params.id].text);
|
||||
nameUpdate(notes[params.id].name);
|
||||
}
|
||||
|
||||
if (edit) {
|
||||
notes[params.id].name = name;
|
||||
notes[params.id].text = text;
|
||||
localStorage.setObj("Notes", notes);
|
||||
} else {
|
||||
if (settings.CollabEdit === true) {
|
||||
textUpdate(notes[params.id].text);
|
||||
nameUpdate(notes[params.id].name);
|
||||
}
|
||||
}
|
||||
|
||||
setEdit(!edit);
|
||||
|
|
Loading…
Add table
Reference in a new issue