fix(notes/nui): remmove NoteModal content and title on save

This commit is contained in:
Christopher committed 2021-02-08 21:15:12 +01:00
1 parent 8e207ea2b1
commit b57adf5a56
1 file changed
+8 -7
+8 -7
View File
@@ -22,28 +22,29 @@ export const NoteModal = () => {
const _handleClose = () => {
setNoteModal(false);
setDetail(null);
setNoteModal(false);
};
const handleNoteSave = () => {
setNoteModal(false);
setDetail(null);
Nui.send('phone:addNote', {
title,
content,
});
setDetail(null)
setDetail(null);
setNoteModal(false);
setTitle('')
setContent('')
};
const handleDeleteNote = () => {
const id = detail.id;
setNoteModal(false);
Nui.send('phone:deleteNote', {
id,
});
setDetail(null);
setNoteModal(false);
};
const handleUpdateNote = () => {
@@ -52,8 +53,8 @@ export const NoteModal = () => {
title,
content,
});
setNoteModal(false);
setDetail(null);
setNoteModal(false);
};
return (