Commit e2ef90f4 authored by Muhammadali's avatar Muhammadali

update-

parent fd9b0c88
...@@ -11,6 +11,8 @@ import InnerCaller from '../components/InnerCaller'; ...@@ -11,6 +11,8 @@ import InnerCaller from '../components/InnerCaller';
import { contextModalEventProperty } from '../context/modalEventProperty'; import { contextModalEventProperty } from '../context/modalEventProperty';
const Root = ({ wsphonedata, onSetDnd, setWsphonedata, callMethod }) => { const Root = ({ wsphonedata, onSetDnd, setWsphonedata, callMethod }) => {
const boxDialer = window.BoxDialer;
const [phoneModal, setPhoneModal] = useState(false); const [phoneModal, setPhoneModal] = useState(false);
const [dynamicValue, setDynamicValue] = useState('pending'); const [dynamicValue, setDynamicValue] = useState('pending');
const [modalState, setModalState] = useState(false); const [modalState, setModalState] = useState(false);
...@@ -21,15 +23,18 @@ const Root = ({ wsphonedata, onSetDnd, setWsphonedata, callMethod }) => { ...@@ -21,15 +23,18 @@ const Root = ({ wsphonedata, onSetDnd, setWsphonedata, callMethod }) => {
type: null, type: null,
from: '', from: '',
}); });
const [callEventsContext, setCallEventsContext] = useContext(
contextModalEventProperty, const [callEvents, setCallEvents] = useContext(
typeof contextModalEventProperty == 'undefined'
? {}
: contextModalEventProperty,
); );
const [callEvents, setCallEvents] = useState(null);
const boxDialer = window.BoxDialer;
console.log('state_callEvents: ', callEvents); console.log('state_callEvents: ', callEvents);
useEffect(() => {
setCallEventsContext(callEvents); // const [callEvents, setCallEvents] = useState(null);
}, [callEvents]); // useEffect(() => {
// setCallEventsContext(callEvents);
// }, [callEvents]);
useEffect(() => { useEffect(() => {
if (secondLine) { if (secondLine) {
setTimeout(() => { setTimeout(() => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment