feat(notes/nui): useAlet hook

This commit is contained in:
Christopher committed 2021-02-08 18:52:04 +01:00
1 parent fc1f6b3ad3
commit 59973fcf9e
4 files changed
+31 -1

No files matched your search

@@ -2,9 +2,12 @@ import { useSetRecoilState } from 'recoil';
import { useNuiEvent } from '../../../os/nui-events/hooks/useNuiEvent';
import { useNotes } from './useNotes';
import { noteStates } from './state';
import { useNotesAlert } from './useNoteAlert';
export const useNotesService = () => {
const setNotes = useSetRecoilState(noteStates.noteItems);
const setAlert = useSetRecoilState(noteStates.alert);
useNuiEvent('NOTES', 'setNotes', setNotes);
return useNotes();
useNuiEvent('NOTES', 'setAlert', setAlert)
return { useNotes, useNotesAlert };
};