Commit b2120e96 authored by Muhammadali's avatar Muhammadali

update-2.2.5

parent 93fc2d61
{
"name": "boxdialer",
"version": "2.2.4",
"version": "2.2.5",
"description": "",
"main": "src/boxDialer.js",
"scripts": {
......
......@@ -7,21 +7,25 @@ const ControlRenderBX = () => {
const [typeEnvironments, setTypeEnvironments] = useState('none');
var intervalFetchToBx;
// useEffect(() => {
// intervalFetchToBx = setInterval(intervalFunc, 1000);
// console.log('intervalFetchToBx');
// }, []);
// const intervalFunc = () => {
// if (!Boolean(wsphonedata?.number)) {
// setWsphonedata(window.alovoice_wsphone);
// }
// if (Boolean(wsphonedata?.number)) {
// clearInterval(intervalFetchToBx);
// intervalFetchToBx = null;
// }
// };
useEffect(() => {
intervalFetchToBx = setInterval(intervalFunc, 1000);
console.log('intervalFetchToBx');
setWsphonedata(window.alovoice_wsphone);
}, []);
const intervalFunc = () => {
if (!Boolean(wsphonedata?.number)) {
setWsphonedata(window.alovoice_wsphone);
}
if (Boolean(wsphonedata?.number)) {
clearInterval(intervalFetchToBx);
intervalFetchToBx = null;
}
};
const testFunc = (e) => {
console.log('dsadasdsd', e);
setWsphonedata(e);
......
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