mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-05 06:28:51 +00:00
fix(Dial/nui): rename functions
This commit is contained in:
1 parent
c7b185014d
commit
f4b77d9f51
5 files changed
+13
-13
No files matched your search
+2
-2
@@ -30,7 +30,7 @@ import config from './config/default.json';
|
|||||||
import { useRecoilState } from 'recoil';
|
import { useRecoilState } from 'recoil';
|
||||||
import { useCallService } from './modal/hooks/useCallService';
|
import { useCallService } from './modal/hooks/useCallService';
|
||||||
import { useModal } from './modal/hooks/useModal';
|
import { useModal } from './modal/hooks/useModal';
|
||||||
import { useDailService } from './apps/dialer/hooks/useDialService';
|
import { useDialService } from './apps/dialer/hooks/useDialService';
|
||||||
|
|
||||||
// Inject mock data when in development env.
|
// Inject mock data when in development env.
|
||||||
if (process.env.NODE_ENV === 'development') {
|
if (process.env.NODE_ENV === 'development') {
|
||||||
@@ -303,7 +303,7 @@ function Phone() {
|
|||||||
useNotesService();
|
useNotesService();
|
||||||
usePhotoService();
|
usePhotoService();
|
||||||
useCallService();
|
useCallService();
|
||||||
useDailService();
|
useDialService();
|
||||||
|
|
||||||
const { modal } = useModal(); // the calling modal
|
const { modal } = useModal(); // the calling modal
|
||||||
|
|
||||||
|
|||||||
@@ -7,11 +7,11 @@ import { useApp } from '../../../os/apps/hooks/useApps';
|
|||||||
import { Switch, Route } from 'react-router-dom';
|
import { Switch, Route } from 'react-router-dom';
|
||||||
import DialPage from './views/DialPage';
|
import DialPage from './views/DialPage';
|
||||||
import DialerNavBar from './DialerNavBar';
|
import DialerNavBar from './DialerNavBar';
|
||||||
import { useDailHistory } from '../hooks/useDialHistory';
|
import { useDialHistory } from '../hooks/useDialHistory';
|
||||||
|
|
||||||
export const DialerApp = () => {
|
export const DialerApp = () => {
|
||||||
|
|
||||||
const history = useDailHistory()
|
const history = useDialHistory()
|
||||||
|
|
||||||
const dialer = useApp('DIALER');
|
const dialer = useApp('DIALER');
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { atom } from 'recoil';
|
import { atom } from 'recoil';
|
||||||
|
|
||||||
export const dailerState = {
|
export const dialState = {
|
||||||
history: atom({
|
history: atom({
|
||||||
key: 'dailerHistory',
|
key: 'dailerHistory',
|
||||||
default: null,
|
default: null,
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import { useRecoilValue } from 'recoil';
|
import { useRecoilValue } from 'recoil';
|
||||||
import { ICall } from '../../../common/typings/call';
|
import { ICall } from '../../../common/typings/call';
|
||||||
import { dailerState } from './state';
|
import { dialState } from './state';
|
||||||
interface ICallUI {
|
interface ICallUI {
|
||||||
history: ICall[]
|
history: ICall[]
|
||||||
}
|
}
|
||||||
|
|
||||||
export const useDailHistory = (): ICallUI => {
|
export const useDialHistory = (): ICallUI => {
|
||||||
const history = useRecoilValue(dailerState.history);
|
const history = useRecoilValue(dialState.history);
|
||||||
return history;
|
return history;
|
||||||
};
|
};
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
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 { dialState } from './state';
|
||||||
import { useDailHistory } from './useDialHistory';
|
import { useDialHistory } from './useDialHistory';
|
||||||
|
|
||||||
export const useDailService = () => {
|
export const useDialService = () => {
|
||||||
const setHistory = useSetRecoilState(dailerState.history);
|
const setHistory = useSetRecoilState(dialState.history);
|
||||||
useNuiEvent('DAILER', 'setHistory', setHistory);
|
useNuiEvent('DAILER', 'setHistory', setHistory);
|
||||||
|
|
||||||
return useDailHistory();
|
return useDialHistory();
|
||||||
};
|
};
|
||||||
Reference in new issue
Block a user