tweak(calling/server|client): more history and calling

This commit is contained in:
Christopher committed 2021-01-29 19:56:00 +01:00
commit 9895ea2089
9 files changed
+159 -52

No files matched your search

+8
View File
@@ -0,0 +1,8 @@
import { atom } from 'recoil';
export const dailerState = {
history: atom({
key: 'dailerHistory',
default: null
})
}
@@ -0,0 +1,7 @@
import { useRecoilValue } from 'recoil';
import { dailerState } from './state';
export const useDailHistory = () => {
const history = useRecoilValue(dailerState.history);
return history;
}
@@ -0,0 +1,11 @@
import { useSetRecoilState } from 'recoil'
import { useNuiEvent } from '../../../os/nui-events/hooks/useNuiEvent';
import { dailerState } from './state';
import { useDailHistory } from './useDailHistory';
export const useDailService = () => {
const setHistory = useSetRecoilState(dailerState.history);
useNuiEvent('DAILER', 'setHistory', setHistory);
return useDailHistory()
}
+8
View File
@@ -9,6 +9,14 @@ export interface CallProps {
export interface ICall {
transmitter: string;
transmitterSource: number;
transmitterIdentifier: string;
receiver: string;
receiverSource: number;
receiverIdentifier: string;
}
export interface ICallUI {
tranmitter: string;
receiver: string;
type: string;
}