Commit 19be58e4 authored by Muhammadali's avatar Muhammadali

update

parent e28a7b08
...@@ -14,7 +14,7 @@ const Root = ({ data, onSetDnd }) => { ...@@ -14,7 +14,7 @@ const Root = ({ data, onSetDnd }) => {
// localStorage.setItem('activeValue', +localValue + 1); // localStorage.setItem('activeValue', +localValue + 1);
// else localStorage.setItem('activeValue', 1); // else localStorage.setItem('activeValue', 1);
// }, []); // }, []);
const [dataSecond, setDataSecond] = useState({}); const [dataSecond, setDataSecond] = useState([]);
if (!data) { if (!data) {
data = { data = {
iscloud: true, iscloud: true,
...@@ -34,6 +34,9 @@ const Root = ({ data, onSetDnd }) => { ...@@ -34,6 +34,9 @@ const Root = ({ data, onSetDnd }) => {
data = window.alovoice_wsphone; data = window.alovoice_wsphone;
onSetDnd = window.alovoice_onsetdnd; onSetDnd = window.alovoice_onsetdnd;
} }
useEffect(() => {
console.log(data, 'data');
}, [data.reason]);
const [phoneModal, setPhoneModal] = useState(false); const [phoneModal, setPhoneModal] = useState(false);
const [dynamicValue, setDynamicValue] = useState('pending'); const [dynamicValue, setDynamicValue] = useState('pending');
...@@ -70,7 +73,7 @@ const Root = ({ data, onSetDnd }) => { ...@@ -70,7 +73,7 @@ const Root = ({ data, onSetDnd }) => {
phoneNumber={data?.number} phoneNumber={data?.number}
reason={data?.reason} reason={data?.reason}
widjetVersion={packageJson?.version} widjetVersion={packageJson?.version}
leftTime={dataSecond.lefttime} leftTime={data.lefttime}
position={data.position || 'bottomLeft'} position={data.position || 'bottomLeft'}
onClick={() => { onClick={() => {
phoneModal ? setPhoneModal(false) : setPhoneModal(true); phoneModal ? setPhoneModal(false) : setPhoneModal(true);
...@@ -84,7 +87,7 @@ const Root = ({ data, onSetDnd }) => { ...@@ -84,7 +87,7 @@ const Root = ({ data, onSetDnd }) => {
phoneNumber={data?.number} phoneNumber={data?.number}
reason={data?.reason} reason={data?.reason}
widjetVersion={packageJson?.version} widjetVersion={packageJson?.version}
leftTime={dataSecond.lefttime} leftTime={data.lefttime}
position={data.position || 'bottomLeft'} position={data.position || 'bottomLeft'}
onClick={() => { onClick={() => {
phoneModal ? setPhoneModal(false) : setPhoneModal(true); phoneModal ? setPhoneModal(false) : setPhoneModal(true);
......
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