Make use of library instead of having code duplicated (#201)

* Use fivem-nui-react-lib
This commit is contained in:
J Francisco Rader authored and GitHub committed 2021-04-07 19:07:10 -03:00
1 parent 0cf5bc2bc7
commit 8e79eb1345
60 files changed
+231 -347

No files matched your search

+2 -1
View File
@@ -1,8 +1,8 @@
import { useRecoilState } from 'recoil';
import { CallProps } from '../../../../../typings/call';
import Nui from '../../nui-events/utils/Nui';
import { callerState } from './state';
import { CallEvents } from '../../../../../typings/call';
import { useNuiRequest } from 'fivem-nui-react-lib';
interface CallHook {
call: CallProps;
@@ -13,6 +13,7 @@ interface CallHook {
}
export const useCall = (): CallHook => {
const Nui = useNuiRequest();
const [call, setCall] = useRecoilState(callerState.currentCall);
const acceptCall = () => {