mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
fix(calls): check if player does not exist --no-verify
This commit is contained in:
1 parent
951ed914d5
commit
46484be9bc
3 files changed
+22
No files matched your search
@@ -2,8 +2,21 @@ import { useSetRecoilState } from 'recoil';
|
||||
import { useNuiEvent } from 'fivem-nui-react-lib';
|
||||
import { dialState } from './state';
|
||||
import { CallEvents } from '../../../../../typings/call';
|
||||
import { IAlert, useSnackbar } from '../../../ui/hooks/useSnackbar';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
export const useDialService = () => {
|
||||
const { addAlert } = useSnackbar();
|
||||
const { t } = useTranslation();
|
||||
|
||||
const handleAddAlert = ({ message, type }: IAlert) => {
|
||||
addAlert({
|
||||
message: t(`APPS_${message}`),
|
||||
type,
|
||||
});
|
||||
};
|
||||
|
||||
const setHistory = useSetRecoilState(dialState.history);
|
||||
useNuiEvent('DIALER', CallEvents.SET_CALL_HISTORY, setHistory);
|
||||
useNuiEvent('DAILER', CallEvents.SEND_ALERT, handleAddAlert);
|
||||
};
|
||||
Reference in new issue
Block a user