mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +00:00
tweak(calling/server|client): more history and calling
This commit is contained in:
commit
9895ea2089
9 files changed
+159
-52
No files matched your search
@@ -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()
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
Reference in new issue
Block a user