mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-03 14:38:45 +00:00
13 lines
538 B
TypeScript
13 lines
538 B
TypeScript
import { useNuiEvent } from '../../../os/nui-events/hooks/useNuiEvent';
|
|
import { useSetRecoilState } from 'recoil';
|
|
import { contactsState } from './state';
|
|
import { useContacts } from './useContacts';
|
|
import { useSnackbar } from '../../../ui/hooks/useSnackbar';
|
|
|
|
export const useContactsService = () => {
|
|
const setContacts = useSetRecoilState(contactsState.contacts);
|
|
const { addAlert } = useSnackbar()
|
|
useNuiEvent('CONTACTS', 'setContacts', setContacts);
|
|
useNuiEvent('CONTACTS', 'setAlert', addAlert);
|
|
return useContacts();
|
|
}; |