Commit 3ff88cbd authored by Muhammadali's avatar Muhammadali

update-

parent 48cc5124
{
"name": "boxdialer",
"version": "4.7.7",
"version": "4.7.8",
"description": "",
"main": "src/boxDialer.js",
"scripts": {
......
......@@ -13,14 +13,6 @@ window.BoxDialer = new BoxDialer();
const container = document.getElementById('boxdialerwidjet');
const root = createRoot(container);
window.onbeforeunload = () => {
if (typeof BX !== 'undefined') {
console.log('window_onbeforeunload =============-------------');
localStorage.removeItem('mycall');
localStorage.removeItem(BX.bitrix_sessid() + '_mycall');
}
};
root.render(
<React.StrictMode>
<LanguageController>
......
......@@ -155,6 +155,15 @@ const Root = ({ wsphonedata, onSetDnd, setWsphonedata, callMethod }) => {
wsphonedata,
);
window.onbeforeunload = () => {
if (typeof BX !== 'undefined') {
console.log('window_onbeforeunload =============-------------');
localStorage.removeItem('mycall');
localStorage.removeItem(BX.bitrix_sessid() + '_mycall');
alert('blablabla closing');
}
};
if (!wsphonedata || !wsphonedata?.number || !wsphonedata?.position) return;
return (
<>
......
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