From 26a4c1c31a6cfc95dcdab36e80a33560a3486df2 Mon Sep 17 00:00:00 2001 From: itschip Date: Fri, 29 Jan 2021 18:57:12 +0000 Subject: [PATCH] Prettified Code! --- phone/src/apps/dialer/hooks/state.ts | 6 +++--- phone/src/apps/dialer/hooks/useDailHistory.ts | 2 +- phone/src/apps/dialer/hooks/useDailService.ts | 6 +++--- phone/src/common/typings/call.ts | 2 +- resources/client/cl_main.ts | 5 ++--- resources/server/sv_main.ts | 2 +- resources/utils/events.ts | 8 ++++---- 7 files changed, 15 insertions(+), 16 deletions(-) diff --git a/phone/src/apps/dialer/hooks/state.ts b/phone/src/apps/dialer/hooks/state.ts index 8cd30a8..f3386f4 100644 --- a/phone/src/apps/dialer/hooks/state.ts +++ b/phone/src/apps/dialer/hooks/state.ts @@ -3,6 +3,6 @@ import { atom } from 'recoil'; export const dailerState = { history: atom({ key: 'dailerHistory', - default: null - }) -} \ No newline at end of file + default: null, + }), +}; diff --git a/phone/src/apps/dialer/hooks/useDailHistory.ts b/phone/src/apps/dialer/hooks/useDailHistory.ts index 1c787af..8669438 100644 --- a/phone/src/apps/dialer/hooks/useDailHistory.ts +++ b/phone/src/apps/dialer/hooks/useDailHistory.ts @@ -4,4 +4,4 @@ import { dailerState } from './state'; export const useDailHistory = () => { const history = useRecoilValue(dailerState.history); return history; -} \ No newline at end of file +}; diff --git a/phone/src/apps/dialer/hooks/useDailService.ts b/phone/src/apps/dialer/hooks/useDailService.ts index 7e918b2..eb227cc 100644 --- a/phone/src/apps/dialer/hooks/useDailService.ts +++ b/phone/src/apps/dialer/hooks/useDailService.ts @@ -1,4 +1,4 @@ -import { useSetRecoilState } from 'recoil' +import { useSetRecoilState } from 'recoil'; import { useNuiEvent } from '../../../os/nui-events/hooks/useNuiEvent'; import { dailerState } from './state'; import { useDailHistory } from './useDailHistory'; @@ -7,5 +7,5 @@ export const useDailService = () => { const setHistory = useSetRecoilState(dailerState.history); useNuiEvent('DAILER', 'setHistory', setHistory); - return useDailHistory() -} \ No newline at end of file + return useDailHistory(); +}; diff --git a/phone/src/common/typings/call.ts b/phone/src/common/typings/call.ts index ba2c7f7..fbe7787 100644 --- a/phone/src/common/typings/call.ts +++ b/phone/src/common/typings/call.ts @@ -19,4 +19,4 @@ export interface ICallUI { tranmitter: string; receiver: string; type: string; -} \ No newline at end of file +} diff --git a/resources/client/cl_main.ts b/resources/client/cl_main.ts index 847c90a..bec1490 100644 --- a/resources/client/cl_main.ts +++ b/resources/client/cl_main.ts @@ -354,7 +354,7 @@ on(`__cfx_nui:${events.OPEN_APP_CAMERA}`, () => { RegisterNuiCallbackType(events.OPEN_APP_DAILER); on(`__cfx_nui:${events.OPEN_APP_DAILER}`, () => { emitNet(events.PHONE_CALL_FETCH_CALLS); -}) +}); RegisterCommand( 'phone', @@ -365,7 +365,6 @@ RegisterCommand( false ); - RegisterNuiCallbackType('phone:close'); on(`__cfx_nui:phone:close`, () => { Phone(); @@ -430,4 +429,4 @@ onNet('phone:sendCredentials', (number: string) => { data: number, }) ); -}); \ No newline at end of file +}); diff --git a/resources/server/sv_main.ts b/resources/server/sv_main.ts index 033a2e8..3f6f853 100644 --- a/resources/server/sv_main.ts +++ b/resources/server/sv_main.ts @@ -72,4 +72,4 @@ onNet('phone:getCredentials', async () => { } catch (error) { console.log('Failed to get number. ', error); } -}); \ No newline at end of file +}); diff --git a/resources/utils/events.ts b/resources/utils/events.ts index c7ba346..956b520 100644 --- a/resources/utils/events.ts +++ b/resources/utils/events.ts @@ -94,11 +94,11 @@ export default { CAMERA_DELETE_PHOTO_SUCCESS: 'phone:deletePhotoSuccess', CONTACTS_ACTION_RESULT: 'phone:contactActionResult', // copy - PHONE_USE_CLIPBOARD: "phone:useClipboard", + PHONE_USE_CLIPBOARD: 'phone:useClipboard', // calling - PHONE_INITIALIZE_CALL: "phone:beginCall", - PHONE_START_CALL: "phone:startCall", + PHONE_INITIALIZE_CALL: 'phone:beginCall', + PHONE_START_CALL: 'phone:startCall', PHONE_ACCEPT_CALL: 'phone:acceptCall', PHONE_END_CALL: 'phone:endCall', PHONE_CALL_WAS_ENDED: 'phone:callEnded', @@ -106,5 +106,5 @@ export default { PHONE_CALL_REJECTED: 'phone:rejectCall', PHONE_CALL_WAS_REJECTED: 'phone:callRejected', PHONE_CALL_FETCH_CALLS: 'phone:fetchCalls', - PHONE_CALL_SEND_HISTORY: 'phone:sendCallHistory' + PHONE_CALL_SEND_HISTORY: 'phone:sendCallHistory', };