mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-03 14:38:45 +00:00
fix(notes/nui): remmove NoteModal content and title on save
This commit is contained in:
1 parent
8e207ea2b1
commit
b57adf5a56
1 file changed
+8
-7
@@ -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 (
|
||||
|
||||
Reference in new issue
Block a user