Commit 9ee0f200 authored by Muhammadali's avatar Muhammadali

update

parent 82df0fe4
{ {
"name": "boxdialer", "name": "boxdialer",
"version": "1.9.5", "version": "1.9.6",
"description": "", "description": "",
"main": "src/boxDialer.js", "main": "src/boxDialer.js",
"scripts": { "scripts": {
......
...@@ -12,34 +12,32 @@ const Root = ({ data, onSetDnd }) => { ...@@ -12,34 +12,32 @@ const Root = ({ data, onSetDnd }) => {
let localValue = localStorage.getItem('activeValue') || false; let localValue = localStorage.getItem('activeValue') || false;
const [stateData, setStateData] = useState({}); const [stateData, setStateData] = useState({});
// if (!data) { if (!data) {
// data = { data = {
// iscloud: true, iscloud: true,
// number: '4003', number: '4003',
// wsurl: 'cld.alovoice.uz:61040', wsurl: 'cld.alovoice.uz:61040',
// server_id: 40, server_id: 40,
// secret: '26a830', secret: '26a830',
// lefttime: 231461, lefttime: 231461,
// reasons: ['free', 'outcalls', 'home', 'totop'], reasons: ['free', 'outcalls', 'home', 'totop'],
// reason: 'free', reason: 'free',
// variant: 'bxmini', variant: 'bxmini',
// position: 'bottomRight', position: 'bottomRight',
// }; };
// } }
// if (window?.alovoice_wsphone) { if (window?.alovoice_wsphone) {
// data = window.alovoice_wsphone; data = window.alovoice_wsphone;
// onSetDnd = window.alovoice_onsetdnd; onSetDnd = window.alovoice_onsetdnd;
// } }
useEffect(() => { useEffect(() => {
if (window?.alovoice_wsphone) { if (data || window.alovoice_wsphone) {
// data = window.alovoice_wsphone; setStateData(data);
setStateData(window.alovoice_wsphone);
onSetDnd = window.alovoice_onsetdnd;
} }
}, [window?.alovoice_wsphone]); }, [window?.alovoice_wsphone, data]);
console.log('stateData:', stateData); console.log('stateData:', stateData, data);
const [phoneModal, setPhoneModal] = useState(false); const [phoneModal, setPhoneModal] = useState(false);
const [dynamicValue, setDynamicValue] = useState('pending'); const [dynamicValue, setDynamicValue] = useState('pending');
......
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