mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-03 22:16:54 +00:00
fix alert provider | remove alert from notes and contact
This commit is contained in:
1 parent
9ba8bd683f
commit
b4258718d8
13 files changed
+67
-175
No files matched your search
@@ -1,13 +1,16 @@
|
||||
|
||||
import { createContext, useCallback } from 'react';
|
||||
import { useSetRecoilState } from 'recoil';
|
||||
import { useNuiEvent } from '../../../os/nui-events/hooks/useNuiEvent';
|
||||
import { useNotes } from './useNotes';
|
||||
import { noteStates } from './state';
|
||||
import { useNotesAlert } from './useNoteAlert';
|
||||
import { useSnackbar } from '../../../ui/hooks/useSnackbar';
|
||||
|
||||
export const useNotesService = () => {
|
||||
const { addAlert } = useSnackbar()
|
||||
const setNotes = useSetRecoilState(noteStates.noteItems);
|
||||
const setAlert = useSetRecoilState(noteStates.alert);
|
||||
|
||||
useNuiEvent('NOTES', 'setNotes', setNotes);
|
||||
useNuiEvent('NOTES', 'setAlert', setAlert)
|
||||
return { useNotes, useNotesAlert };
|
||||
useNuiEvent('NOTES', 'setAlert', addAlert)
|
||||
return useNotes();
|
||||
};
|
||||
Reference in new issue
Block a user