mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
feat(Alerts): alerts for contacts
This commit is contained in:
1 parent
11af8bfb5a
commit
9846a4e1ae
4 files changed
+31
-21
No files matched your search
@@ -2,12 +2,12 @@ import { useNuiEvent } from '../../../os/nui-events/hooks/useNuiEvent';
|
||||
import { useSetRecoilState } from 'recoil';
|
||||
import { contactsState } from './state';
|
||||
import { useContacts } from './useContacts';
|
||||
import { useContactAlert } from './useAlert';
|
||||
import { useSnackbar } from '../../../ui/hooks/useSnackbar';
|
||||
|
||||
export const useContactsService = () => {
|
||||
const setContacts = useSetRecoilState(contactsState.contacts);
|
||||
const setAlert = useSetRecoilState(contactsState.contactAlert);
|
||||
const { addAlert } = useSnackbar()
|
||||
useNuiEvent('CONTACTS', 'setContacts', setContacts);
|
||||
useNuiEvent('CONTACTS', 'setAlert', setAlert);
|
||||
return { useContacts, useContactAlert };
|
||||
};
|
||||
useNuiEvent('CONTACTS', 'setAlert', addAlert);
|
||||
return useContacts();
|
||||
};
|
||||
Reference in new issue
Block a user