Prettified Code!

This commit is contained in:
itschip authored and GitHub Action committed 2021-01-29 18:57:12 +00:00
1 parent 9895ea2089
commit 26a4c1c31a
7 files changed
+15 -16

No files matched your search

+3 -3
View File
@@ -3,6 +3,6 @@ import { atom } from 'recoil';
export const dailerState = { export const dailerState = {
history: atom({ history: atom({
key: 'dailerHistory', key: 'dailerHistory',
default: null default: null,
}) }),
} };
@@ -4,4 +4,4 @@ import { dailerState } from './state';
export const useDailHistory = () => { export const useDailHistory = () => {
const history = useRecoilValue(dailerState.history); const history = useRecoilValue(dailerState.history);
return history; return history;
} };
@@ -1,4 +1,4 @@
import { useSetRecoilState } from 'recoil' import { useSetRecoilState } from 'recoil';
import { useNuiEvent } from '../../../os/nui-events/hooks/useNuiEvent'; import { useNuiEvent } from '../../../os/nui-events/hooks/useNuiEvent';
import { dailerState } from './state'; import { dailerState } from './state';
import { useDailHistory } from './useDailHistory'; import { useDailHistory } from './useDailHistory';
@@ -7,5 +7,5 @@ export const useDailService = () => {
const setHistory = useSetRecoilState(dailerState.history); const setHistory = useSetRecoilState(dailerState.history);
useNuiEvent('DAILER', 'setHistory', setHistory); useNuiEvent('DAILER', 'setHistory', setHistory);
return useDailHistory() return useDailHistory();
} };
+1 -1
View File
@@ -19,4 +19,4 @@ export interface ICallUI {
tranmitter: string; tranmitter: string;
receiver: string; receiver: string;
type: string; type: string;
} }
+2 -3
View File
@@ -354,7 +354,7 @@ on(`__cfx_nui:${events.OPEN_APP_CAMERA}`, () => {
RegisterNuiCallbackType(events.OPEN_APP_DAILER); RegisterNuiCallbackType(events.OPEN_APP_DAILER);
on(`__cfx_nui:${events.OPEN_APP_DAILER}`, () => { on(`__cfx_nui:${events.OPEN_APP_DAILER}`, () => {
emitNet(events.PHONE_CALL_FETCH_CALLS); emitNet(events.PHONE_CALL_FETCH_CALLS);
}) });
RegisterCommand( RegisterCommand(
'phone', 'phone',
@@ -365,7 +365,6 @@ RegisterCommand(
false false
); );
RegisterNuiCallbackType('phone:close'); RegisterNuiCallbackType('phone:close');
on(`__cfx_nui:phone:close`, () => { on(`__cfx_nui:phone:close`, () => {
Phone(); Phone();
@@ -430,4 +429,4 @@ onNet('phone:sendCredentials', (number: string) => {
data: number, data: number,
}) })
); );
}); });
+1 -1
View File
@@ -72,4 +72,4 @@ onNet('phone:getCredentials', async () => {
} catch (error) { } catch (error) {
console.log('Failed to get number. ', error); console.log('Failed to get number. ', error);
} }
}); });
+4 -4
View File
@@ -94,11 +94,11 @@ export default {
CAMERA_DELETE_PHOTO_SUCCESS: 'phone:deletePhotoSuccess', CAMERA_DELETE_PHOTO_SUCCESS: 'phone:deletePhotoSuccess',
CONTACTS_ACTION_RESULT: 'phone:contactActionResult', CONTACTS_ACTION_RESULT: 'phone:contactActionResult',
// copy // copy
PHONE_USE_CLIPBOARD: "phone:useClipboard", PHONE_USE_CLIPBOARD: 'phone:useClipboard',
// calling // calling
PHONE_INITIALIZE_CALL: "phone:beginCall", PHONE_INITIALIZE_CALL: 'phone:beginCall',
PHONE_START_CALL: "phone:startCall", PHONE_START_CALL: 'phone:startCall',
PHONE_ACCEPT_CALL: 'phone:acceptCall', PHONE_ACCEPT_CALL: 'phone:acceptCall',
PHONE_END_CALL: 'phone:endCall', PHONE_END_CALL: 'phone:endCall',
PHONE_CALL_WAS_ENDED: 'phone:callEnded', PHONE_CALL_WAS_ENDED: 'phone:callEnded',
@@ -106,5 +106,5 @@ export default {
PHONE_CALL_REJECTED: 'phone:rejectCall', PHONE_CALL_REJECTED: 'phone:rejectCall',
PHONE_CALL_WAS_REJECTED: 'phone:callRejected', PHONE_CALL_WAS_REJECTED: 'phone:callRejected',
PHONE_CALL_FETCH_CALLS: 'phone:fetchCalls', PHONE_CALL_FETCH_CALLS: 'phone:fetchCalls',
PHONE_CALL_SEND_HISTORY: 'phone:sendCallHistory' PHONE_CALL_SEND_HISTORY: 'phone:sendCallHistory',
}; };