diff --git a/phone/src/apps/dialer/components/DialPadGrid.tsx b/phone/src/apps/dialer/components/DialPadGrid.tsx
index d0482b0..daff0e6 100644
--- a/phone/src/apps/dialer/components/DialPadGrid.tsx
+++ b/phone/src/apps/dialer/components/DialPadGrid.tsx
@@ -1,4 +1,4 @@
-import React from 'react';
+import React, { useContext } from 'react';
import { Box, Button, Grid } from '@material-ui/core';
import { makeStyles, Theme } from '@material-ui/core/styles';
import { DialInputCtx } from '../context/InputContext';
@@ -27,28 +27,26 @@ const ButtonItem = ({ label, onClick }: IBtnItem) => {
};
export const DialGrid = () => {
+ const { add, removeOne, clear} = useContext(DialInputCtx)
+
return (
-
- {({ add, removeOne, clear }) => (
-
-
- add(1)} />
- add(2)} />
- add(3)} />
- add(4)} />
- add(5)} />
- add(6)} />
- add(7)} />
- add(8)} />
- add(9)} />
-
- add(0)} />
-
- add('-')} />
-
-
- )}
-
+
+
+ add(1)} />
+ add(2)} />
+ add(3)} />
+ add(4)} />
+ add(5)} />
+ add(6)} />
+ add(7)} />
+ add(8)} />
+ add(9)} />
+
+ add(0)} />
+
+ add('-')} />
+
+
);
};
diff --git a/phone/src/apps/dialer/components/DialerInput.tsx b/phone/src/apps/dialer/components/DialerInput.tsx
index 4b45268..4fe1822 100644
--- a/phone/src/apps/dialer/components/DialerInput.tsx
+++ b/phone/src/apps/dialer/components/DialerInput.tsx
@@ -1,4 +1,4 @@
-import React from 'react';
+import React, { useContext } from 'react';
import { Box, IconButton, InputBase, Paper } from '@material-ui/core';
import { makeStyles, Theme } from '@material-ui/core/styles';
import PhoneIcon from '@material-ui/icons/Phone';
@@ -27,6 +27,8 @@ const useStyles = makeStyles((theme: Theme) => ({
export const DialerInput = () => {
const classes = useStyles();
+ const { inputVal } = useContext(DialInputCtx)
+
const handleCall = (number: string) => {
Nui.send('phone:beginCall', {
number,
@@ -34,19 +36,15 @@ export const DialerInput = () => {
};
return (
-
- {({ inputVal, add }) => (
-
-
-
- handleCall(inputVal)} />
-
-
- )}
-
+
+
+
+ handleCall(inputVal)} />
+
+
);
};
diff --git a/phone/src/modal/hooks/state.ts b/phone/src/modal/hooks/state.ts
index 674eacc..ea43d96 100644
--- a/phone/src/modal/hooks/state.ts
+++ b/phone/src/modal/hooks/state.ts
@@ -7,7 +7,7 @@ export const callerState = {
}),
callModal: atom({
key: 'callingModal',
- default: true
+ default: false
}),
callDuration: atom({
key: 'callDuration',